Congratulations to our 2022 Qt Champions!

Qt5.8 vs Uninstalled Qt4 and Qt5

  • First off, I am a noob. I am running UbuntuStudio 16.04.

    I installed Qt5.8. plus Qt Creator in the /opt directory. I used qmake to compile Qupzilla and discovered I had qmake5.5 from remnants of a supposedly uninstalled earlier Qt version.

    PRO:/opt$ qmake --version
    QMake version 3.0
    Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu

    There are both Qt4 and Qt5 folders in the /usr/lib/x86_64-linux-gnu folder. I have listings for Qt4 Assistant, Designer, and Linguist in the programs menu.

    I would like for all traces of the Qt4 and Qt5 programs to be uninstalled and to get qmake for 5.8 working.

    How do I do this?

    The menu listing for Qt Creator, when selected, calls for an address that is not in /opt where the Qt Creator directory resides.
    Is there a conf file somewhere to straighten this out?


    m alexander

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    When calling qmake like that, you are calling the qmake from your distribution, so if you don't want that you have to uninstall the corresponding packages.

    Otherwise the simplest and more clean solution is to use the full path to the qmake version you'd like to use. That way you ensure that you are calling the exact version you want.

    As for Qt Creator, if you are using your distribution's Qt Creator, then you have to add your Qt 5.8 to it in order to use it. Just go in the Settings under Build and Run, add your Qt 5.8 there and make a Kit using it.

    Then you'll be ready to build your application by selecting that kit.

  • @SGaist Howdy,

    Thanks for the reply. When used qmqke on Qupzilla, It returned an error message saying that Qupzilla needed qmake5.7 or above. Hence the qmake --version call. Is there a file that can be edited to turn off the Qt5 and allow the Qt5.8 to dominate?

    If this is the wrong forum for this, please point me to the correct forum.


    m alexander

  • Lifetime Qt Champion

    @oeblio As @SGaist explained: call qmake from Qt 5.8, that's all!

    PATH_TO_QT5.8/bin/qmake ...

    So, you need to provide the whole path to the correct qmake, not just call qmake.

Log in to reply