(C++) Qt Creator project type
February 24, 2017 · View on GitHub
(C++)
Qt Creator project type
The Qt Creator project type is the type of Qt Creator project.
There are multiple project types for desktop applications:
Console
application: a desktop
applications that must be called from
the command line and/or display plain text only
GUI application: a
desktop applications that displays not
just plain text, but, for example, images
Determining the project type
There are multiple ways to determine the project type:
- select the project type
- modify the project file
Determining the project type: select the project type
When creating a new project, the project type can be selected in the 'New Project' screen:
- View the 'New Project' screen (Qt Creator version 1.2.1)
- View the 'New Project' screen (Qt Creator version 2.0.0)
Selecting a project type only lets Qt Creator help in writing a project file. This project file can always be modified to change the project type.
Determining the project type: modify the project file
The project file determines the project type.
The project file of a console application:
#------------------------------------------------- # # Project created by QtCreator 2011-01-14T13:36:30 # #------------------------------------------------- QT += core QT -= gui TARGET = CppConsoleApplication CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp
The project file of a GUI application:
#------------------------------------------------- # # Project created by QtCreator 2011-01-14T13:37:45 # #------------------------------------------------- QT += core gui TARGET = CppGuiApplication TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui