PDA

View Full Version : Qt 5 Create Empty project



freiza
24th February 2015, 13:26
In qt creator 3.3, There is no option for creating empty project. There is only a qmake empty project.
How do I create empty project.

ChrisW67
24th February 2015, 19:59
What do you mean by an "empty" project?
Just create an empty folder and you have an empty project. No much use for anything. You can use Qt Creator's File menu Create New File option to put files in your empty project, treating it like a big text editor.

You probably mean the project you get when you use the Create Project wizard and select Non-Qt Project, Plain C or C++ project.

freiza
24th February 2015, 20:08
I don't want to create a non-qt project. I just don't want form or additional cpp files that is generated with qt widget application.
I want a empty project and want to add all qt headers by myself.
Earlier in qt creator there was an option for creating empty qt project and now it is gone.

ChrisW67
24th February 2015, 20:16
Other Projects, Empty Qt Project?

freiza
24th February 2015, 20:57
10962

Look at the image there is no empty project under other project.
But there is Empty Qmake project and I think it is something different. You have to write your own qmake with it.
I just want to know why there is not "Empty project" inside other project? Is it removed from qt creator 3.3?

wysota
24th February 2015, 21:13
Could you specify the difference between what you get with "empty qmake project" and what you would like to receive with "empty project"? For example what tools would you use to build the "empty project" project?

freiza
24th February 2015, 21:42
solved:

To all the newbie's like me, if you want to create empty qt project file.
Create a non-qt c++ sources or create an empty qmake project and the add these lines to your .pro file



TARGET = worldisnotenough #what you want to call your exe

SOURCES += main.cpp #add the name of your source files

HEADERS += headername.h # add the name of your header file

QT += core gui #for using qtcore and qtgui stuff
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets #for qt5

acide
12th November 2015, 22:25
la solution la plus simple
-on utilise "empty qmake project" apres avoir cree le nouveau fichier, entre dans fichier.pro et insere QT+=widgets (attention a la casse)
et continue en creant ton fichier source comme d'habitude! ca marche!

Radek
13th November 2015, 17:22
Have you tried that "empty qmake project"? It is not intended for your custom qmake for sure (writing a custom qmake would be rather challenging). Moreover, the "empty qmake project" is at the same position as an ordinary "empty project" in Linux. I bet it's the same - you will start with an empty .pro file and you will write everything yourself.