Unable to exclude QtCore or QtGui from build
-
I want to test builds without the above libraries, at least with QtGui, but have had no luck in doing so.
[code]QT -= core gui[/code]
... inside my *.pro file does nothing; the libraries can still be seen linked in the Compile Output pane.Is there another way for me to enforce it?
-
Hi,
Are you trying to build a non-Qt project? If so, open this in Qt Creator: File -> New File or Project... -> Non-Qt Project -> Plain C++ Project.
All Qt projects require Qt Core.
-
-
[quote author="Adrian5" date="1422529757"]I see, so they're both essential for regular Qt Projects.[/quote]If you are making a console application, you can do QT -= gui to remove the dependency on Qt GUI. (You cannot do this if you use any GUI classes, of course)
Qt Core is always required.
[quote author="Adrian5" date="1422529757"]I had intended to see what not including them does to the memory footprint of the running application, which seems to have balooned for me in 5.4 compared to an earlier version of Qt5 I used.[/quote]Do you mean increased memory with exactly the same code, when you changed versions?
-
[quote author="JKSH" date="1422539765"]Do you mean increased memory with exactly the same code, when you changed versions?[/quote]
That's the impression I was under, but now that I tried to reproduce it by linking to various Qt versions down to 5.2.1, I can't observe any discernable difference.I talked to some users on IRC and one of them reported that their memory usage from 5.3 to 5.4 increased from about 5.5 to 35MB for a bare QtWidgets project (i.e. empty window). However my memory usage remains around 46MB accross various Qt5 verions, as reported by Massif (54MB in task manager).
I understand that this number might only increase gradually when putting to use the library's rich feature set, but to me it does make Qt a lot less attractive for writing small GUI based tools, which was my main interest in learning it; i.e. pick what you need, leave the rest.