Include <QtDebug> in QT 4.7.4
-
I am running the latest QT SDK. However, it seems I can no longer use the qtdebug function since include <QtDebug> library doesn't exist anymore in this new version. Do we still use this for debugging purposes or how do we make screen prints or cout type statements for debugging purposes in the latest QT?
-
@#include <QDebug>@
-
You have created a Qt project right? If you have created a plain c/c++ project the libraries may not be include-able :)
-
[quote author="ddriver" date="1329939265"]You have created a Qt project right? If you have created a plain c/c++ project the libraries may not be include-able :)[/quote]
Are you serious?! I am using the Plain C++ Project just to make it less convoluted when I'm trying to test the OpenCV codes. How would I make the qDebug library "include-able" in a Plain C++ Project??
[quote author="koahnig" date="1329939628"]QtDebug and QDebug are on include/QtCore. Both are including qdebug.h.[/quote]
My qdebug.h is all the way in here:
C:\QtSDK\QtSources\4.8.0\include\QtCoreBut it's not picking it up from QT Creator.
-
Well, you have told Qt you don't want to use the Qt framework and still wonder why it cannot find a Qt library.
Qt modules are not include-able in plain c++ project to me as well, autocomplete is not finding anything as well, as far as the IDE is concerned there are no Qt modules.
Maybe there is a workaround for this like using absolute path for include... or if the experts know a way to override this?
-
[quote author="ddriver" date="1329940704"]Well, you have told Qt you don't want to use the Qt framework and still wonder why it cannot find a Qt library.
Qt modules are not include-able in plain c++ project to me as well, autocomplete is not finding anything as well, as far as the IDE is concerned there are no Qt modules.
Maybe there is a workaround for this like using absolute path for include... or if the experts know a way to override this?[/quote]
I tried to add the path directly in and it doesn't work either
@ INCLUDEPATH += C:\opencv\build\include
C:\QtSDK\QtSources\4.8.0\include @ -
But it does work if you create a Qt project right?
I can only point out the reason why it isn't working, hopefully someone more adept than me can elaborate how to include Qt libraries in a plain C++ project.
-
Well, my suggestion would be to setup the project as a Qt project and check the differences in the different settings of the .pro file. It does nto have to be the compelete setup, but the main skeleton. The comparison hopefully provides the hints.
For one thing the discussion here concentrates on single lines, but the problem might be somewhere else.
This engineering approach is not scientific, but it works most times ;-)