Cannot add qmake files to Qt Versions [armhf] - c++

I installed qt4-qmake:armhf and qt5-qmake:armhf but I cannot add it to Qt Versions in Qt Creator manually. I get error:
The qmake executable could not be added: qmake""is not an executable.
What else should I try?

I am using windows right now, but searching file list for the 2 packages in debian repository online it seems that that qmake is located in:
/usr/bin/qmake-qt4 for qt4
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
for qt5

Related

Unknown module(s) in QT: webenginewidgets

Hi. I want to connect QtWebEngineWidgets. To do this, you need to write(https://doc.qt.io/qt-5/qtwebenginewidgets-module.html) in .cpp file
#include <QtWebEngineWidgets>
and
QT += webenginewidgets
inside .pro file.
The problem is that when writing to a .pro file, I get the error - Unknown module(s) in QT: webenginewidgets
Everywhere I read, it is only written that you need to connect the module in the .pro file, but it doesn’t work for me. Am I doing everything right?
• Qt Creator version - 5.0.0 Community
• Qt version - 6.1.3
• C++ compiler version - MSVC2019 64bit 17.032112.339(amd64)
UPD:
I want to add that this module is not in the installer.
Installer exaple1, Installer example2
It turned out that it was necessary to install a newer version of Qt. For example, since version 6.2.3.0 and newer, the installer contains the "WebView" item. I'm installing it now and I'll see if it helps. Thank you.
Possibly the needed files aren't installed. Try adding this package containing the development files:
sudo apt-get install qtwebengine5-dev

how to specify search directory for source code build

I am trying to install Jom (http://wiki.qt.io/Jom) for C++. When I type in qmake -r in cmd, I get the error Project MESSAGE: Cannot build jom with Qt version 4.8.7. Project ERROR: Use at least Qt 5.2.0.. This is because I have PyQt version 4.8.7 and Qt version 5.8.0 both installed. When building Jom, Jom searches for in the wrong Qt folder. How can I fix this?
If you have multiple version of Qt installed, you also have multiple version of qmake. You can check which qmake you are running by using where qmake on Windows, it will output a list of qmake executable available in your path, the first one in the list will be the one executed when running qmake.
For instance:
C:\>where qmake
C:\Qt\5.8\msvc2015\bin\qmake.exe
C:\Qt\5.6\msvc2015\bin\qmake.exe
If the first one, is not the one you want, you can run it by using its complete path:
C:\>C:\Qt\5.6\msvc2015\bin\qmake.exe -version
QMake version 3.0
Using Qt version 5.6.2 in C:/Qt/5.6/msvc2015/lib
If the qmake and Qt version you want is not in your PATH, you can use the scripts provided by Qt to setup a valid environment. These are available in the Start menu as Qt 5.8 64-bit for Desktop (MSVC 2015) (change according to your installation), or you can use them directly by executing qtenv2.bat (e.g C:\Qt\5.8\msvc2015\bin\qtenv2.bat).
If you are using MinGW you are all set, but if you are using MSVC you need also to run vcvarsall.bat, which can be found in your Visual installation folder.

Is there a way to run qmake with QT 5.7 and above?

I have a project I made with Qt 5.7 in QtCreator, but now I would like to be able to build the project with qmake in the terminal rather than through QtCreator. However, I can't get qmake to run with Qt 5.7.
Following the instructions in this webpage, I can switch qmake to qt5 but qmake -v still says I'm running QT 5.2.1. How can I switch this to Qt 5.7?
Edit: Adrien's second comment worked. I was unable to get qmake to switch to Qt 5.7, but I can simply directly call the qmake that came installed with Qt 5.7 like this:
/home/<user>/Qt5.7/Qt5.7.0/gcc<something>/bin/qmake
Short answer: yes of course :)
Each Qt build builds its own qmake binary. So if you already built/installed Qt 5.7, it means you are simply pointing to your previous Qt version's qmake. You can access any Qt version qmake executable from your Qt install folder, i.e. for Linux:
/home/<user_name>/Qt/Qt<version>/<compiler>/bin/qmake
Note that the path to Qtfolder, and its name may vary depending on the settings you used for the first installation.
If you want to use a global setting instead, and if qtchooser -list-versions lists the Qt version you want to use, then make sure to set export QT_SELECT=<Qt version> (without spaces) in the same terminal as the one you use qmake from afterward. Environment variables are not kept when you close your terminal, or shared between different terminals.
export QT_SELECT=qt5
qmake

qwt build - qmake build (Qt 5.3)

I want to compile the qwt library using qt 5.3. Previously I had older versions of Qt. So, when I call the Qt 5.3.0 32-bit for Desktop (MSVC 2012 OpenGL) shell and move to the directory, which contains qwt (C:\qwt-6.1.0), then perform qmake qwt.pro I get this error:
Cannot read c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf: The system cannot find
the path specified. Could not read qmake configuration
file c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf.
Error processing project file: C:\qwt-6.1.0\qwt.pro
Calling:
qmake -set QMAKESPEC "C:\Qt_5.3\5.3\msvc2012_opengl\mkspecs\win32-msvc2012\"
Does not help.
PS. Solution is found! I've tried not to do like is in qwt tutorial, simple open *.pro file by Qt Creator. After this just "build" and everything was done. Without console

Qt on Linux - version conflict?

Trying to move a Qt 4.6.3 project from Windows to Debian Linux (Etch). I've installed Qt by downloading the latest version, then running configure, then make install as root. Yet when I run qmake_qt4 on my project's pri file, here's what I get:
uic: File generated with too old version of Qt Designer
Running uic -v returns 4.2.1. How come? Wasn't make install supposed to put the latest Qt on the system?
By default, Qt installs to /usr/local/Trolltech/Qt-4.6.3 and doesn't add it's bin folder to your PATH variable. Also, it's just named qmake.
Either call /usr/local/Trolltech/Qt-4.6.3/bin/qmake using the complete path or add the /usr/local/Trolltech/Qt-4.6.3/bin/ path to your PATH variable and ensure that it is listed there before any other path that may have a qmake. Best thing to do is to uninstall the the debian qt version if you don't need it elsewhere.