PDA

View Full Version : QtSingleApplication, QtService and Qt5



mentalmushroom
28th December 2012, 14:39
Hello. I am using QtSingleApplication and QtService from QtSolutions in my applications. They work fine with Qt4, but I can't build them against Qt5:


yarko@ubuntu:/qt/qt-solutions/qtsingleapplication$ qmake
WARNING: Include file /qt/qt-solutions/qtsingleapplication/config.pri not found
yarko@ubuntu:/qt/qt-solutions/qtsingleapplication$ make
cd examples/ && ( test -f Makefile || /qt/qt-5.0.0-x64/5.0.0/gcc_64/bin/qmake /qt/qt-solutions/qtsingleapplication/examples/examples.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/qt/qt-solutions/qtsingleapplication/examples'
cd trivial/ && ( test -f Makefile || /qt/qt-5.0.0-x64/5.0.0/gcc_64/bin/qmake /qt/qt-solutions/qtsingleapplication/examples/trivial/trivial.pro -o Makefile ) && make -f Makefile
WARNING: Include file /qt/qt-solutions/qtsingleapplication/config.pri not found
make[2]: Entering directory `/qt/qt-solutions/qtsingleapplication/examples/trivial'
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../qt-5.0.0-x64/5.0.0/gcc_64/mkspecs/linux-g++-64 -I. -I../../src -I../../../../qt-5.0.0-x64/5.0.0/gcc_64/include -I../../../../qt-5.0.0-x64/5.0.0/gcc_64/include/QtNetwork -I../../../../qt-5.0.0-x64/5.0.0/gcc_64/include/QtGui -I../../../../qt-5.0.0-x64/5.0.0/gcc_64/include/QtCore -I. -o qtsingleapplication.o ../../src/qtsingleapplication.cpp
In file included from ../../src/qtsingleapplication.cpp:42:0:
../../src/qtsingleapplication.h:44:30: fatal error: QtGui/QApplication: No such file or directory
compilation terminated.


I'm running Ubuntu 12.04.1 LTS x64, Qt5 x64 is installed.

I've searched over the web and it seems like those classes use some deprecated functionality and should be replaced. Is there a way to use QtSolutions along with Qt5? Or are there new superseding classes in Qt5 framework?

wysota
28th December 2012, 15:20
Get rid of "QtGui/" from the include line. Also make sure your project file contains a QT+=widgets line.