Qmake variable |
Description |
|
# Xxxx |
Comment, starting from "#" and ending with this line |
|
Sources |
Source File |
Sources = *. cpp |
Multiple source files can be separated by spaces. |
Sources = 1.cpp 2.cpp 3.cpp |
Or each file can be listed in a separate row, and a new row can be created through a backslash. |
Sources = Hello. cpp \ Main. cpp |
A more lengthy method is to list each file separately, just like this |
Sources + = Hello. cpp Sources + = Main. cpp |
Headers |
Specify header file |
Headers = Hello. h Headers + = Hello. h |
Config |
Configuration Information |
Config + = QT warn_on release |
Compiler flag: L release-the application will be connected and programmed in the release mode. If "debug" is specified, it is ignored. L debug-the application will be connected and programmed in debug mode. L warn_on-the compiler will output as many warning messages as possible. If "warn_off" is specified, it is ignored. L warn_off-the compiler will output as few warning messages as possible. Types of connected libraries/applications: L QT-the application is a QT application, and the QT library will be connected. L thread-the application is a multi-threaded application. L X11-the application is an X11 application or library. L windows-only for "app" templates: an application is a Windows Window application. L console-only used for "app" templates: an application is a console application under windows. L DLL-used only for the "lib" template: the Library is a shared library (DLL ). L staticlib-used only for the "lib" template: the Library is a static library. L Plugin-only used for the "lib" template: the Library is a plug-in, which will make the DLL option take effect. |
Target |
Specify the target file name If this project is not set, the target name is automatically set to the same name as the project file. |
Target = filename |
Interfaces |
Add an interface file (UI) |
Interfaces = filename. UI |
Template |
Module Settings APP (generate application, default) Subdirs (generate MAKEFILE file to compile the sub-Folder specified by subdirs) Lib (generate library files) |
Template = app |
Destdir |
Directory of the generated Application |
Destdir + = ../bin |
Ui_dir |
Specify the UIC command to convert the. UI file to the directory where the UI _ *. h file is stored. |
Ui_dir + = forms |
Rcc_dir |
Specify the RCC command to convert the. qrc file to the directory where qrc _ *. H files are stored. |
Rcc_dir + = ../tmp |
Moc_dir |
Specify the MOC command to convert the header file containing q_object to the directory where the standard. h file is stored. |
Moc_dir + = ../tmp |
Objects_dir |
Directory where the target file is stored |
Objects_dir + = ../tmp |
Dependpath |
Related paths for program Compilation |
Dependpath + =. forms include qrc sources |
Includepath |
Header file inclusion path |
Includepath + =. |
Codecforsrc |
Source file encoding method |
Codecforsrc = GBK |
Forms |
. Uidesign file included in the project |
Forms + = forms/painter. UI |
Resources |
Resource files contained in the project |
Resources + = qrc/painter. qrc |
Win32 {...} UNIX {...} |
Platform relevance Processing |
Win32 { Sources + = hello_win.cpp } |
|
|
|
Language |
|
Language = C ++ |
Exists ! Exists |
If a file does not exist, stop qmake. |
! Exists (main. cpp ){ Error ("no main. cpp file found ") } |
Qt |
Warehouse receiving module |
Qt + = xml |
Libs |
Libs + =-l folderpath // path of the introduced lib file-L: Import path Libs + =-llibname // introduce the Lib file-L: import to the database |
Libs + =-L "$ (outdir )"\ -L "$ (solutiondir) lib "\ -Lopengl32 \ -Lglu32 \ -Lobjectdbapi \ -Lgraphicslibd |