Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Getting qtchooser to recognize Qt version >=5.6 to use with qmake

Getting qtchooser to recognize Qt version >=5.6 to use with qmake

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 6.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kaybob
    wrote on last edited by kaybob
    #1

    Background: I'm an engineer but a novice Linux user on Ubuntu 16.04. I'm trying to use some code from a github repository that states it requires Qt >=5.6 to compile.
    Using sudo apt-get install qt5-qmake only installs Qt version 5.5, i.e.

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

    The only way I found to install Qt >=5.6 was to use the open source installer at https://www.qt.io/download. Using that, I installed Qt 5.6 (as well as 5.11) to the default location, home/username/Qt.

    However, qtchooser apparently doesn't recognize any of the versions installed via the qt.io installer, i.e.

    :~$ qtchooser -l
    4
    5
    default
    qt4-x86_64-linux-gnu
    qt4
    qt5-x86_64-linux-gnu
    qt5
    

    and if I change the version (via QT_SELECT=qt5 or such), it only points to the version installed with apt-get (Qt version 5.5.1).

    I tried export QTLIBDIR=$HOME/Qt/5.6/gcc_64 so that qtchooser would know where to find the qmake for 5.6, but it seems to just ignore it, i.e. I still get

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

    I've found older answers elsewhere that state to add a qt56.conf or similar file to /usr/lib/x86_64-linux-gnu/qtchooser with the right folders, which I assumed was

    $HOME/Qt/5.6/gcc_64/bin
    $HOME/Qt/5.6/gcc_64
    

    However, after creating the file with the above contents in the same location at the other .conf files, it does now list qt56 as an option with qtchooser -l but when selecting QT_SELECT=qt56, it simpy reverts to the default (`QT_SELECT="default").

    Summary question: How do I enable qtchooser to recognize the versions of Qt installed with the qt.io installer?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Do you really need qtchooser? If you installed Qt from official installer, you can:

      • open your project in Qt Creator and easily compile/ develop from there
      • from command line, just use export PATH=/path/to/your/qt/installation/qtversion/gcc_64/bin:$PATH and then correct qmake will be used. Then compiling your app is simple: qmake && make

      (Z(:^

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved