[Qt-creator] No Empty Project

Markus Fischer ivanhoe at forty-seven.info
Sat Nov 1 13:23:29 CET 2008


Hi,

Is there a way to create an empty project file where I can add source and header files in my own fashion? Here is a little example for my problem:

I chose a new Qt4 Console Application. I get a *.pro and a main.cpp file. This is the *.pro file:
> #-------------------------------------------------
> #
> # Project created by QtCreator 2008-11-01T13:03:12
> #
> #-------------------------------------------------
> 
> QT       -= gui
> 
> TARGET = viewdit_creator
> CONFIG   += console
> CONFIG   -= app_bundle
> 
> TEMPLATE = app
> 
> 
> SOURCES += main.cpp

Now, when I write the following code into the main.cpp it becomes uncompileable, because it cannot find the headerfile for QApplication.

> #include <QApplication>
> 
> int main(int argc, char *argv[])
> {
>         QApplication app(argc, argv);
>         return app.exec();
> }

But when I use the same main.cpp with a qmake created *.pro file it works fine:

> ######################################################################
> # Automatically generated by qmake (2.01a) Sa Nov 1 13:01:11 2008
> ######################################################################
> 
> TEMPLATE = app
> TARGET = 
> DEPENDPATH += .
> INCLUDEPATH += .
> 
> # Input
> SOURCES += main.cpp

Is there any way to generate the *.pro file like a simple 'qmake -project' would do?



More information about the Qt-creator-old mailing list