Solved Am I getting the correct version of Qt?
-
Hi -
I'm still trying to master the installation and administration of Qt. I've been playing around a little, and I'm not sure I'm getting the right version of Qt from the command line.
From a directory containing one file (hello.cpp) I issue the qmake -install command, and get a makefile. The header gives me reason for concern:
############################################################################# # Makefile for building: hello # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue Feb 28 08:41:23 2017 # Project: hello.pro # Template: app # Command: /usr/lib/x86_64-linux-gnu/qt4/bin/qmake -o Makefile hello.pro #############################################################################
Qt4? I just installed this a couple weeks ago. I'm sure I have Qt5 on my system.
In my earlier experimentation, I had a few false starts with Qt. Is there some way to to a master cleanup of Qt to eradicate any old stuff? I've run the maintenance tool, and that hasn't solved this issue.
Thanks.
-
Hi,
You are likely calling your distribution provided Qt.
Always use the full path of the one you intend to use.
-
Hi Rgaist -
I'm not sure I know what you mean by "distribution provided," but yes, I'm finding my way to the wrong qmake.
mzimmers@debian:~/QtStuff/hello$ which qmake /usr/bin/qmake mzimmers@debian:~/QtStuff/hello$
The qmake I want is in /opt/Qt/5.8/gcc_64/bin/.
I looked in /usr/bin, and there's a bunch of Qt stuff in there. I never specified /usr/bin as an install location, so I'm not sure how it all got there. Are these files even necessary? I'm the only user on this system.
Thanks...
-
That's the standard path for your distribution Qt installation.
Don't worry about that, that's 100% fine.
Therefore my recommendation: when your using a terminal, just use the full path to the qmake version you want to use. That way you ensure that you are calling the one you need/want.
-
@mzimmers
Hi
For ubuntu I had to do
http://askubuntu.com/questions/820054/selecting-qt5-using-qtchooser
Not sure it applies to a pure debian :)
https://packages.debian.org/jessie/qtchooserAlso , for Mint 18, i had to use
https://packages.debian.org/jessie/qt5-default -
@SGaist do I correctly understand that the standard Debian installation includes a version of Qt?
And I surmise that it's probably better if I don't go into /usr/bin and try to clean it up myself, right?
Hi, mrjj - I saw the chooser and was thinking about using it. I'll report back on how it works with Debian if I find anything wrong.
Thanks...
-
Debian provides both Qt 4 and Qt 5 but AFAIK, the default is still Qt 4.
Indeed, don't go there moving stuff around, there's nothing to clean. You'll just break your co-worker setup.
-
@mzimmers
Hi
well something like
qtchooser -list-versions
is not dangerous :)