#include "mainwindow.h"#include <QApplication>int main(int argc, char *argv[]){ QApplication a(argc, argv); MainWindow w; w.show(); return a.exec();}
#-------------------------------------------------## Project created by QtCreator 2013-08-19T15:48:30##-------------------------------------------------QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsTARGET = HelloTEMPLATE = appSOURCES += main.cpp\ mainwindow.cppQMAKE_CXXFLAGS += -O2HEADERS += mainwindow.hFORMS += mainwindow.ui
/ qtsingleapplication buildlib doc examples src INSTALL.TXT README.TXT common.pri configure configure.bat qtsingleapplication.pro
file(GLOB_RECURSE project_SRCS *.cpp *.h)find_package(Qt5Widgets REQUIRED)add_executable(singleapp ${project_SRCS} ${project_MOC_SRCS_GENERATED})qt5_use_modules(singleapp Core)target_link_libraries(singleapp)if("${CMAKE_SYSTEM}" MATCHES "Windows")add_custom_target()else()add_custom_target()endif()