How to update Qt version that qmake uses? - qt

I am trying to use qmake with QT 5.7.0 or later. I have installed QT 5.7.0. I have never installed another version of QT before or after this. When I run
qmake --version
it tells me it is using Qt 5.5.1. I don't know how it gets to this version, this version was never installed by me. I would like to update the version that qmake uses. How can I do that?

Related

qmake not properly recognized in QT Creator under Debian 11 "bullseye"

I have installed QT Creator under Debian 11 "bullseye" (sudo apt-get -y install qtcreator), resulting in QT creator version 4.14.1.
Then I installed qmake (sudo apt install qt5-qmake), resulting in qmake version 5.15.2.
Now I want to add qmake in QT Creator options under Kits->QT versions, but it says
QT version is not properly installed, please run make install
and it refuses to work:
I have also another machine with Debian 12 bookworm, where I have been using this setup without any problem for several months (the yellow triangle in the screenshot below is only warning). On Debian 12 bookworm, the QT Creator is now version 8.0.1 (recently it was 6. something) and qmake version is 5.15.4:
Any idea how to make it work under Debian 11? I need to use the older environment, because I need specific older libraries to be build in the application.
I have tried almost everything that I found over the internet, but nothing helped. Usually the sources say to install qt5-default package, but this is not available in Debian 11.

Qt Kit Selection

I recently installed Qt Creator on my Ubuntu machine using the command:
$ sudo apt install qtcreator
$ sudo apt install qt5-default
I also know that it is correctly installed through this
$ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
However, the Qt Creator app still does not let me select a Kit because my Qt Versions is
still empty:
It seems there are others with the same issue but I cannot find a solution.
Ultimately, this all began because I was trying to make a project after installing Qt but I could not get passed this Kit Selection:
menu. I learned that the kit selection problem stems from not having the "Qt version" installed. However, I still cannot find a solution to how I can correctly install this Qt version.
you should install gcc and g++ compiler, look at Qt documentation
you should write this command
sudo apt-get install build-essential
Launch Qt Creator. Go to Tools > Options. Click Build & Run and select
tab Kit. Configure a compiler if it is not automatically detected.
this problem happens because of qt creator didn't understand and find the compiler, you should install it, after that it is usually automatically detected. if you have this issue again you should add it manually in the compiler section and in the kit section set compiler for your Desktop kit.
For adding manually compiler look at this QT Documentation
For adding manually kit look at this QT Documentation
For Adding Qt Versions manually
look at this QT Documentation
To add a Qt version:
Select Tools > Options > Kits > Qt Versions > Add.
Select the qmake executable for the Qt version that you want to add.
Select the Qt version to view and edit it.
In the Version name field, edit the name that Qt Creator suggests
for the Qt version.
In the qmake location field, you can change the qmake location.
If the Qt version is for QNX, enter the path to your installed QNX
SDK in the QNX SDK field.

I need a minimal QT 5.0 Compiler install for Ubuntu 14.04 64bit

I need a minimal QT 5.0 Compiler install for Ubuntu 14.04 64bit
I just need to run qmake and have the QT includes, macros and libraries work under g++. I do not need The QT GUI development environment.
I tried the following...
wget http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0.run
... Follow instructions... At the end I get "Warning: QSqlDatabase: QMYSQL driver not loaded" which I need.
So I had to build from source, which takes overnight! (but does work)...
git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.5
... Follow instructions... It does work.
I only want the compiler, not everything! How do I get that?
Alan.
Just install a package called build-essential + the Qt5 development packages you need (or qt5-default package). Ubuntu 14.04 has Qt 5.2.1 in the package repositories.
build-essential installs g++ tool chain and qt5-default installs the Qt5 development libraries.
Qt is not a compiler. It is a toolkit framework library coded for C++.
You need at least a C++11 compiler, like GCC (g++, at least 4.9) or Clang/LLVM (clang++)
You probably want to say that you don't need the QtCreator editor and IDE.

Qwt installation for Qt Creator on windows 7

I installed Qt Creator. I would like to use Qwt. I downloaded and unzipped to "C:\qwt-6.1.0" folder. I performed the following instructions:
qmake qwt.pro
mingw32-make
mingw32-make install
There is no error. Everything is fine. But I don't know how I can integrate with Qt creator. I would like to use Qt via form editor. How can I install plugin?
Thanks
Platform
Windows 7
Versions
Qt Creator 2.7.2
Qt 5.1.0(32 bit)
Qwt 6.1.0
http://www.qtcentre.org/threads/53787-HowTo-Installation-of-Qt-5-0-1-and-Qwt-6-1-0-rc3-(Win7-64bit)
check this.Its works also on win8 64 bit.

Qt 4.8 compiling from ubuntu to windows

I have a simple app that I can compile on the desktop for Ubuntu 12.04, but not for Windows. I installed the MinGW toolchain, both from synaptic, and the QT 64-bit package from here.
I went to Tools-->Options-->Build, and manually added both the /usr/bin/i686-w64-mingw32-g++, as well as the g++.exe from the link above (in the bin folder) as MANUAL_1 and MANUAL_2.
When I go to create a custom target however I am unable to select either Manual toolchain and it reverts back the standard GCC x86_64 linux.
What am I doing wrong?
I doubted the g++.exe file would work since that is a windows binary, but why does it not select the system mingw binaries?
Few things you should check
Your gcc version number
Is your gcc path added to environmental variable?
I too found it very difficult to compile my MINGW Qt application in Windows, and after lot of research on net I found that qt4 works with gcc 4.4.0 MINGW. I downloaded qtcreator 2.1 from qt website and copy MINGW folder from qtcreator directory, copy that folder into my windows root directory then installed latest qt creator and qt4 sdk,
Add path of gcc
and finally qt creator compiles my code.

Resources