embedded linux qt Development (iv)--qt Creator project Management First,
QT Creator project Management
Qt Creator manages the source code in the form of a project, and a QT project contains different types of files as follows:
A, . Pro Project description File
B, . Pro.user User Profile
C, . h header File
D, . cpp Source Files
E, . UI interface Description File
F, resource files (Pictures, audio, etc.)
ii.. Pro Project description file
1. The. Pro Project profile is basically composed of the following:
A, # Comment Start character
B, QT Module Declaration
C, TARGET executable file name
D, TEMPLATE Program Template declaration
E, SOURCES source File declaration
F, HEADERS header File Declaration
G, FORMS Interface File Declaration
H, Rc_file resource File declaration
2. advanced variables for the. Pro Project description file:
A, Includepath Header File search path
B, CONFIG Set configuration information and compilation options for a project
C, LIBS Add a third-party library file
D, defines defining compilation Macros
Config common options:
A, Debug to build the debug version of the executable program
B, Release to build the release version of the executable program
C, Debug_and_release Build both Debug and release versions
D, warn_on Export as many warning messages as possible
E, Warn_off do not output warning messages
iii. nature of the . Pro File
The. Pro file is essentially a makefile file in Qt and is a platform-independent makefile file in Qt.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/88/A5/wKiom1f99rGS2JgDAAB7KTpDISM464.png "title=" Picture 1.png "alt=" Wkiom1f99rgs2jgdaab7ktpdism464.png "/>
QT Creator when you open a project file, the. pro.user file is generated, and the. pro.user file contains the QT-related local configuration information, and you need to delete the. pro.user file when you need to move items between different computers.
Four,
. Pro Project description file instance
#-------------------------------------------------
#
# Name: Qt Creator Project Demo
# Author:Delphi Tang
# Date: 2015-08-24
#
#-------------------------------------------------
QT + + Core GUI
GreaterThan (Qt_major_version, 4): QT + = Widgets
TARGET = HelloWorld
TEMPLATE = App
Includepath + = e:/bcc/include \
E:/vc/include
SOURCES + = Main.cpp \
HelloWorld.cpp
HEADERS + = HelloWorld.h
FORMS + = Helloworld.ui
Rc_file + = Myico.rc
LIBS + =-le:/vlc-1.11/sdk/lib
CONFIG + = warn_on Debug
#
# if ' Debug ' option is set for CONFIG
#
CONFIG (Debug) {
Defines + = Debug_log
SOURCES + = DebugLog.cpp
HEADERS + = DebugLog.h
}
This article from "Life is endless, struggle not only" blog, declined reprint!
Embedded Linux QT Development (iv)--QT creator project Management