0

I have searched all day in order to use Qt 5.4 or Qt 5.5. I have two machines, one running Ubuntu 15 and the other Ubuntu 14, but got the same results. I have installed the program through the download-online package, and now I have beautiful /opt/Qt/5.4/ and /opt/Qt/5.5 folders.

That's all. I am stuck in here. If I run qmake -version, the reply is:

Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu

Also, if I run qtchooser -list-versions, I get:

4
5
default
qt4-x86_64 linux-gnu
qt4
qt5-x86_64 linux-gnu
qt5

I have to use SuperCollider 3.7 for an important project, and I need Q t5.4 or higher. Is there anybody who can tell me what to do after installing the package to make programs see Qt 5.4 or higher?

I even tried to build from the source code, but in that case init-repository doesn't work.

Luca

agold
  • 6,140
  • 9
  • 38
  • 54
TakeMeToTheMoon
  • 527
  • 1
  • 8
  • 25

3 Answers3

3

I have had the same problem different times, therefore my late answer. You should create the file /etc/xdg/qtchooser/default.conf, and put the path to the bin and lib directory, for example:

/opt/Qt/5.5/gcc_64/bin
/opt/Qt/5.5/gcc_64/lib

Now this is the default configuration, and it is shown with qtchooser -l as such.

See man qtchooser:

   /etc/xdg/qtchooser/*.conf

System-wide configuration files. Each has two lines, the first is the path to the binaries and the second is the path to the Qt libraries. If a default.conf is provided, the settings from it will be automatically used in case nothing else is selected.

agold
  • 6,140
  • 9
  • 38
  • 54
0
  1. Launch any version of Qt Creator. It can be either the old one from previous install or the newer one.
  2. Go to Projects/Manager Kits and add kits in which you are interested (Qt 5.4, 5.5 or the one which is install by default)
  3. Open any project, code and build with any of the specified kits.
Alexander Tyapkov
  • 4,837
  • 5
  • 39
  • 65
  • Hi, Alexander. Thank you for your answer. I should use cmake/make install to build my thing. Is it gonna work anyways? – TakeMeToTheMoon Sep 13 '15 at 09:13
  • Probably, you can have a look at this answer in case you have a CMake project. http://stackoverflow.com/questions/13698790/importing-a-cmake-project-in-qtcreator – Alexander Tyapkov Sep 13 '15 at 09:34
0

As I was digging in the right way to change the default choice for qt session in my old ubuntu 14.04 LTS, I did find this old topic as best match for my own question.

So here my answer for any 14.04 living in 2019 : the default package qmake point on qtchooser, which looks for its conf in /usr/lib/x86_64-linux-gnu/qt* directories

The default conf is in /usr/lib/x86_64-linux-gnu/qt-default/ . If you haven't this, look at your "qtchooser -print-env" result to see what's your own path. I think that a good practice to set this as system default should be to create a link from the xdg default to your ubuntu standard default (as it works for me) :

sudo mkdir -p /etc/xdg/qtchooser/
cd /etc/xdg/qtchooser/
ln -s /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf default.conf

As far I can see, there's no more things as "Managers Kits" in qtcreator