QT5 Creator "/usr/bin/g++" is used by qmake, but "/usr/bin/g++-9" is configured in the kit - c++

In QT5 Creator, I changed the compiler version in the project kit, but it's throwing the above error now(note: 'g++' in this context refers to version 10, which QT5 isn't compatible with). I found some information on using terminal commands to change some stuff with qmake, but does anyone know how I can fix this?
Edit: To clarify, a kit different from the default kit is being used for this project(that's what I changed), and I'm migrating this project from QT4 to QT5. This is installed on Ubuntu, and there aren't multiple versions of QT on here(installed from Ubuntu repositories)

Related

Do I need to install Mingw compiler components in Qt installation if i had already installed Mingw in my computer?

I installing Qt open source framework in my window 10 pc. I already downloaded Mingw compiler and installed it to write C/C++. Now I wanna learn QT framework. I using Qt online installer. I choice to download custom compoment. Do I need to selet mingw component to download if i had already installed?
Note that there's not just one MinGW distribution and version out there. You can check out the exact supported version per Qt release at https://wiki.qt.io/MinGW .
Anyhow, if you install the pre-built Qt binaries via the online installer, the matching MinGW version will automatically be installed for you, and will be registered in Qt Creator so that things just work. There is actually no official way to prevent this.

Qt cannot load cocoa plugin

I'm trying to compile and run an application on a MacBook using Qt Creator. There are no issues compiling the project, but when I try and run it, it seems to be unable to load a plugin.
Could not load the Qt platform plugin "cocoa" in "" even though it was found.
The application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
This error occurs both when trying to run the application from Qt Creator or via Finder. It seems to only happen when I use the CMake build system (no issues when using QMake), but my existing project that I need to deploy on MacOS uses CMake.
My steps to reproduce are:
Install a completely clean MacOS (no user data)
Install Xcode 11
Install CMake 3.15
Install Qt 5.13.1 MacOS package
Open QtCreator->New Project->Qt Quick Application - Scroll
Set build system to CMake (important)
Compile and notice error
I am using:
Qt 5.13.1
macOS Catalina 10.15
Apple Clang 11
I recognize that for final user deployment I will need to use the macqtdeploy tool to copy the Qt libraries to the executable folder, but I should be able to run my app from QtCreator without doing this? Especially as it works fine when using QMake.
So it ended up being some kind of name resolution thing where Qt Creator couldn't decide whether to use the debug or release versions of the framework. Supplying DYLD_IMAGE_SUFFIX=_debug fixed this (add this to the environment section under Kits).

iOS kit not detected on Qt (macOS)

I am currently trying to port an android application on iOS. The application was developped on Linux. But I can't manage to use Qt on macOs for iOS developpement.
I followed those (rather unclear) instructions : http://doc.qt.io/qt-5/ios-support.html
First, I installed successfully XCode and I managed to deploy a dummy app on my iPhone. Then, I installed Qt and opened the ".pro" project file.
But the only kit I can use is "Desktop Qt 5.4.1 clang 64 bit". The kits for iOS don't seem to be detected.
Did I do something wrong ? Am I missing something ?
EDIT:
When I launch the ".pro", I got this error :
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Unfortunately, it is NOT related to this well known issue (Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild)
When I run the command :
/usr/bin/xcodebuild
I get this error:
xcodebuild: error: The directory /Users/<UserName> does not contain an Xcode project
Okay I managed to solve my problem by re installing Qt with version 5.8 (instead of 5.9.1).
But I am not sure this is what was causing the issue though. In deed, I realized I installed Qt prior to configuring XCode the first time(with my Developer Account).

c++ Qt Qwt build issue

I a Qt neophyte so I apologize in advance if this question is obvious...
I just downloaded and installed the latest version of Qt Creator 5 as well as Qwt (Qt Widgets for Technical Applications) on my Windows7 machine.
Qwt.pro does not build using QT Creator on my windows machine.
It all worked fine on my Ubuntu machine using Qt Creator 4.
Is there a compatibility issue with Qwt and the newest version of Qt??
Have you installed the MinGW version Qt? If not make sure you have installed Visual Studio, which contains the MSVC compiler. To get started use the MinGW version, the MSVC compiler is faster on Windows but more complicated to set up. For testing run qmake in your Qwt directory directly from the Qt console (start menu). Also make sure you can build a simple hello world project with Qt Creator first.

qmake on a mac missing for qt-creator

I am working on Mac OS X at the moment, and wanted to start building apps using Qt Creator.
Unfortunately i can't build any applications as it gives me an error saying that qmake's path is not found or qmake is missing.
I tried using netbeans, which works perfectly with simple c/c++ programs, but for qt apps it then gives me the same error.
My version of Xcode 4 works perfectly and builds without any problems.
Any ideas?
Thanks :)
It is not enough to just download the Qt Creator, you need to download the complete sdk: http://qt.nokia.com/downloads (almost 1GiB)
My Macbook is no longer my primary computer. But, when it was, I found out through painful experiences that it was best to install software from MacPorts whenever what you wanted was available from http://www.macports.org/
Even more important, I also discovered that when software was not offered from MacPorts, it was invariably because that particular software did not install without some sort of tweaking on a Mac. Hence, since Macports does not currently offer Qt v5, and I had problems installing the qt-project.com Qt v5.2.1 SDK on my Macbook, I would advise to go with the MacPort for Qt v4.8.5 [qt4-mac] which includes qmake. Qt Creator is available as a separate MacPort [qt4-creator-mac].
Here is how I successfully installed Qt v4.8.5 [with qmake] and Qt Creator on my Macbook:
1) 'sudo port install qt4-mac'
2) 'sudo port install qt4-creator-mac'
3) I used Finder to run Qt Creator which was in the /Applications/MacPorts/Qt4 folder.
4) When I first ran Qt Creator, its Preferences dialog listed the auto-installed Desktop kit, but that kit had no Qt version, no qmake, and no debugger.
5) Manually added a second kit.
6) Configured kit's Qt version for /opt/local/bin/qmake, which is where qt4-mac installed qmake. This was enough for the kit to now discover Qt v4.8.5 which had been installed by qt4-mac.
7) Used kit's auto-detect feature to now discover the debugger.
8) Configured that kit to be the default kit.