I have error Project ERROR: Unknown module(s) in QT: positioning
when I'm trying to build QT5 dependent project with qmake
, I suspect that problem can be in old QT4 installation that was installed before.
qmake -version
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
So my questions are:
1.How to resolve this error?
2.How to completelly remove Qt4 (and maybe reinstall QT5?)?
Update:
which qmake
/usr/bin/qmake
ls -l /usr/bin/qmake
lrwxrwxrwx 1 root root 9 апр. 4 2016 /usr/bin/qmake -> qtchooser
dpkg -l|grep qt5|grep qmake
ii qt5-qmake:amd64 5.2.1+dfsg-1ubuntu14.3 amd64 Qt 5 qmake Makefile generator tool
qt5-qmake
lots of output like /usr/lib/x86_64-linux-gnu/qt5/*
/usr/lib/x86_64-linux-gnu/qt5/bin
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
qtchooser -list-versions
4
5
default
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5
qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
After I set export QT_SELECT=qt5
:
qtchooser -print-env
QT_SELECT="qt5"
QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
Also I have tried:
qtchooser -run-tool=qmake -qt=qt5 ../src
But I still have same error.
You can install the development files for QT5 positioning module using this command:
Also make sure your system defaults to QT5 instead of QT4:
You need to make sure to use qmake from Qt Version 5. This depends on you PATH Variable if you type in "qmake" in your Terminal.
The following steps may help you as an solution:
Go to your source and run "qmake" again. You don't need to uninstall Qt4. You can more then one development Versions on your system.
To resolve the Error
make sure you have addedto your .pro file. Please have a look also to http://doc.qt.io/qt-5/qtpositioning-module.html form more configuration to use Qt Positioning C++ Classes