Qt project file pro Comments

TEMPLATE = app       #模板类型
TARGET = JM_DEMO     #项目名称
INCLUDEPATH += .     #包含路径

# Input
HEADERS += Test.h \  #头文件

SOURCES += Test.c \  #源文件

1, the operation symbol

"=" Operator

The operator simply assigns a value to a variable. Use as follows:

TARGET = myapp

This will set the TARGET variable to myapp . This will remove any of the original settings of TARGET.

"+ =" Operator

This operator will be a list of values ​​to add a variable value. Use as follows:

DEFINES += QT_DLL

This will add to the list is put QT_DLL makefile preprocessing defined.

2, variable

TEMPLATE template variable tells qmake makefile to which this application is generated. The following selection is available:

    app - build an application makefile. This is the default, so if the template is not specified, this will be used.
    lib - makefile build a library.
    vcapp - build an application that Visual Studio project file.
    vclib - build a library of Visual Studio project files.
    subdirs - This is a special template, it can create a specific directory and can enter to generate a makefile for the project file and call makefile make of it.

"App" template

"App" template tells qmake to generate a makefile to build an application. When using this template, the following qmake system variables are admitted. You should use them in your .pro file to specify the information for your specific application.

    A list of all the header files of applications - HEADERS.
    A list of all the source files of the application - SOURCES.
    .Ui list of all the files in the application (generated by Qt Designer) of - FORMS.
    Lex list of all the source files of the application - LEXSOURCES.
    YACCSOURCES - a list of all yacc source files in the application.
    TARGET - the name of an executable application. The default value is the name of the project file. (If you need an extension, it will be automatically added.)
    DESTDIR - put a directory executable targets.
    DEFINES - list of additional pre-treatment procedures required by the application definition.
    INCLUDEPATH - contains a list of additional paths required by the application.
    DEPENDPATH - application depends on the search path.
    VPATH - the search path to find additional documentation.
    DEF_FILE - only Windows needed: .def file for the application to be connected.
    RC_FILE - only Windows needs: the application's resource file.
    RES_FILE - only Windows needs: application's resource file to be connected.
 

Released nine original articles · won praise 0 · Views 256

Guess you like

Origin blog.csdn.net/hyj920/article/details/104771819