[Solved] QMessageLogContext does not name a type with Qt SDK 5.0.2 - Ubuntu
-
[deleted]
-
Hi,
It seems you are using a Qt 4 qmake which probably is the one installed with your system's Qt development package.
Did you take a look into your QtCreator Qt versions ?
-
This is from the "about" in my Qt Creator GUI:
@Qt Creator 2.7.0
Based on Qt 5.0.2 (32 bit)Built on Apr 9 2013 at 09:31:06
From revision b6257ef735
Copyright 2008-2013 Digia Plc. All rights reserved.
The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.@
Is that what you mean?
Is there another place I can see the versions? -
No it's not, the version of Qt used to build QtCreator and the one you use to build your application are not related.
Go to Options/Preferences -> Build & Run -> Qt Versions
-
Ahh.... I see... this makes sense now!, here is what it says:
Auto Detect:
Qt 5.0.2 GCC 32bit /opt/Qt5.0.2/5.0.2/gcc/bin/qmakeManual:
Qt 4.8.1 in PATH (System) /usr/bin/qmake-qt4I think you are right, so what do I need to change to make that Qt5?, just point it to the Qt5 path? (where would that be?)
-
But... I just looked at my working Linux and that is exactly the same :(, except it has a different "manual" version 4.6.2...
-
Go in the Kits tab and either add a new kit using your Qt 5 or change the current kit to use your Qt 5
-
Right... so, I have no idea exactly what happened, but this has fixed my issue! :)
What I did was:
Attempted to "Add..." and kit in the build and run menu. Saw loads of options that I did not understand. Then cancelled it. Went back in and saw a new "Desktop" entry under "Manual:". I clicked on new entry again, click auto-detect a few times... Then finally I deleted my new entry.After that I could not build my project (option was greyed out).
Then I closed and opened Qt Creator and tried again, it came up with the "you need to configure your project" page (like when you get the project with no .pro.user file). I had two options, I check the one that had 5.0.2 in it and un-checked the other.
Then... it all just works! - I have the same kits and versions in my build & run options...
I guess this allowed Qt to update itself or something?Anyway, here is my build output:
@g++ -c -pipe -Wall -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/Qt5.0.2/5.0.2/gcc/mkspecs/linux-g++ -I. -Icommsnet -Icommsnet/device -Icommsnet/vocoder -Iconfig -Iif -Irpe -Irtp -ItacChat -Iutils -I/opt/Qt5.0.2/5.0.2/gcc/include -I/opt/Qt5.0.2/5.0.2/gcc/include/QtXml -I/opt/Qt5.0.2/5.0.2/gcc/include/QtNetwork -I/opt/Qt5.0.2/5.0.2/gcc/include/QtCore -I../_out -o ../_out/main.o main.cpp
@Thanks very much for your help SGaist :)
-
Great !
You're welcome !
Don't forget to update the thread's title to solved so other forum users may know that a solution has been found :)
-
Ahhh.... I never knew how that happened!, I thought it was an admin guy doing that :o
I will update it now.
Thanks