0

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.

1

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:

1. check the path of qmake for Qt Version 5
   command: dpkg -l|grep qt5|grep qmake
   if you found the right name, see the details of the installed path:
   command: dpkg -L 
2. set the path to qmake of Qt 5 in the right order
   command: export PATH=:$PATH
3. use qtchooser to switch between version of Qt development
   command: qtchooser -list-versions
   command: qtchooser -print-env
   command: qtchooser -qt=version
   have a look to "man qtchooser" !

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.

  • Udpdated question. – mrgloom Apr 19 '17 at 12:27
0

To resolve the Error

Project ERROR: Unknown module(s) in QT: positioning
make sure you have added

QT += positioning

to 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.