I have a project in qt-creator.
that computer have Qt: 4.8.2
one of the computers i want to run the application on have Qt: 4.6.2
I can see that qt-creator have an option under the project for QtVersions,
but i only got one option there "Qt 4.8.1 (System)"
Id like to have Qt 4.6.x as an option there too, how do i add/install that?
Target computer:
kde4-config --version
Qt: 4.6.2
KDE Development Platform: 4.4.2 (KDE 4.4.2)
kde4-config: 1.0
uname -a
Linux fw-01 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:12:52 UTC 2010 i686 GNU/Linux
Build computer:
kde4-config --version
Qt: 4.8.2
KDE Development Platform: 4.8.5 (4.8.5)
kde4-config: 1.0
uname -a
Linux rito 3.3.8-gentoo #3 SMP Thu Sep 13 10:11:22 CEST 2012 i686 AMD Athlon(tm) II X2 245 Processor AuthenticAMD GNU/Linux
As the SDK doesn't support the old versions anymore, you will have to compile the libraries from source. The archive FTP site has the version you want.
Though I should point out that as long as you are linking dynamically and your code base doesn't use features post-v4.6.2 - then it will work as expected. If you are, then compiling using v4.6.2 headers isn't going to change anything - you will still have to upgrade the other computer or remove the newer Qt features from your application.
My workaround,
installing kubuntu 10.04 in a vitrualbox
copy the project to the virtualbox
compile it using qt-creator inside virtualbox
The binary made in the virtualbox works fine in both 4.6 and 4.8 envirement
In Qt Creator, try tools -> options -> Qt Versions (or Build/run, then qt versions, or some other abomination depending on what qt creator version you have).
Should see a list of Qt versions it knows about. Click add to reference your 4.6 qmake manually. That should get creator to pick it up.
Related
The Problem
I cannot stress this enough but I have looked as far as I can over the internet for a solution and either they didn't have a solution or all they did was add a support ticket. The problem is that after creating a python qt quick application I try opening the QML file but when I go to the design tab it give me this error:
Code
The Designer is very finicky and can crash for various reasons. I've had success seeing the actual errors causing this dialog by launching Creator from the command line with debugging enabled:
QT_LOGGING_RULES="qtc.nodeinstances.init.debug=true" "/Applications/QtCommercial/Qt Creator.app/Contents/MacOS/Qt Creator"
That's specific to macOS but the like approach should work on any OS.
Look for error messages related to "Puppet". That's the name of the subprocess that actually renders the QML for Designer.
You can also go to Preferences -> Qt Quick -> QML Emulation Layer and try the opposite of the current setting and see if it works any better.
The solution that works for me is as follows:
OS: windows 10
Go to Tools >> Options >> Qt Quick >> (tab) Qt Designer
In the "Use fallback QML emulation layer", you see the placeholder path there. Switch it to C:\Qt\Tools\QtDesignStudio\bin or use browse if you have a different install location for Qt such that path\to\QtDesignStudio\bin
Boy do I have a FIX for you guys. I had been screwing around with this same issue to no avail, until I came across an error that wouldn't let me download qt3d (something) and I know that was part of the installation choices so I decided to uninstall everything. A thing to note when uninstalling: the Maintenance Tool doesn't uninstall everything. There were still Qt files located in C:\Users\user\AppData\Roaming I needed to delete those. Also, I needed to go into the Registry Run >>> Regedit >>>> Edit >>> Find >>> then search for Qt and that brought up all of the QT keys that still remained. I just deleted them one by one. For the Reinstall I practically installed everything (within reason) here's the list of my installation selections. Happy Hunting Fellow Qt'errr's!
Qt 5.15.2
Web Assembly
MSVC 2015-64BIT
MSVC2019-32BIT
MSVC2019-64BIT
MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
UWP ARMv7 (MSVC 2015)
UWP x64 (MSVC 2015)
UWP ARMv7 (MSVC 2019)
UWP x64 (MSVC 2019)
UWP x86 (MSVC 2019)
Android
SOURCES
Developer and Designer Tools
Qt Creator 4.15.1 CDB Debugger Support
Debugging Tools for Windows
Qt Creator 4.15.1 Debug Symbols
Qt Creator 4.15.1 Plugin Development
Qt 3D Studio 2.8.0
-MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
Qt 3D Studio OpenGL Runtime 2.8.0
MinGW 7.3.0 64Bit
Qt Installer Framework 4.1
Cmake 3.19.2 32bit
Cmake 3.19.2 64bit
Ninja
License: I chose L GPL
I chose Cmake not qmake
Graphic drivers were the issue in my case. Try updating or changing them.
Maybe that your Direct3D driver seems to have issues with Qt.
The error can be avoided by defining:QT_OPENGL=software in the Windows environment.
Assuming the root cause is the display driver of your computer.
Please reference:
https://bugreports.qt.io/browse/QTCREATORBUG-23455
I have Visual Studio 2017 Community edition installed on my PC.
Recently I installed Qt5.10.1.
I generated a VS project from one of the example .pro files:
qmake -tp vc cube.pro
However when I open this VS project and build it I get the error:
The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
How do I specify once for all that qmake shall target Windows SDK 10.0 instead of 8.1 so that I don't have to retarget manually each time I generate a VS project with qmake?
You cannot select Windows SDK version from qmake.
qmake expects that the environment is correctly setup before it is run.
If you use the command line directly, you will see the following message: Remember to call vcvarsall.bat to complete environment setup!.
This means that you have to run vcvarsall.bat with the proper options to setup the MSVC toolchain including your selected Windows SDK version.
Some examples:
# MSVC 2017 for 64 bit
vcvarsall.bat amd64
# MSVC 2017 for 64 bit using Windows 8.1 SDK
vcvarsall.bat amd64 8.1
# MSVC 2017 for 64 bit using Windows 10 SDK version 10.0.10240.0
vcvarsall.bat amd64 10.0.10240.0
# MSVC 2015 (installed with 2017 installer) for 64 bit using Windows 10 SDK version 10.0.10240.0
vcvarsall.bat amd64 10.0.10240.0 -vcvars_ver=14.0
And the help message from vcvarsall.bat:
Syntax:
vcvarsall.bat [arch] [platform_type] [winsdk_version] [-vcvars_ver=vc_version]
where :
[arch]: x86 | amd64 | x86_amd64 | x86_arm | x86_arm64 | amd64_x86 | amd64_arm | amd64_arm64
[platform_type]: {empty} | store | uwp
[winsdk_version] : full Windows 10 SDK number (e.g. 10.0.10240.0) or "8.1" to use the Windows 8.1 SDK.
[vc_version] : {none} for default VS 2017 VC++ compiler toolset |
"14.0" for VC++ 2015 Compiler Toolset |
"14.1x" for the latest 14.1x.yyyyy toolset installed (e.g. "14.11") |
"14.1x.yyyyy" for a specific full version number (e.g. 14.11.25503)
The store parameter sets environment variables to support Universal Windows Platform application
development and is an alias for 'uwp'.
For example:
vcvarsall.bat x86_amd64
vcvarsall.bat x86_amd64 10.0.10240.0
vcvarsall.bat x86_arm uwp 10.0.10240.0
vcvarsall.bat x86_arm onecore 10.0.10240.0 -vcvars_ver=14.0
vcvarsall.bat x64 8.1
vcvarsall.bat x64 store 8.1
If you use Qt Creator, you are out of luck. Qt Creator just detects the installed MSVC toolchains, but does not provide any means to add options to the vcvarsall.bat call or to manually add an MSVC toolchain.
Please read the answer of Benjamin T first. This answer elaborates on how it can be configured using QtCreator
QtCreator allows to specify the arguments passed to vcvarsall.bat. Go to Tools > Options > Kits > Compilers:
Clone the desired Auto-detected compiler(s)
Fill in the desired Windows SDK version in the last field of Initialization:
Optional: update the Name to be able to find it back easily in the next step
Under Kits > Kits, change the compiler(s) to your newly created ones (for the desired Kits).
Recently I tried to upgrade Qt to 5.8.0 on Windows 7 32bit from Qt5.6.2 MSVC 2013, and I saw strange issues.
I downloaded and installed Visual Studio 2015 from this link: https://www.visualstudio.com/downloads/
After I installed Qt 5.8.0 MSVC 2015 version, Qt Creator 4.2.1 can be launched. From the welcome page, I selected the example named: "Address Book Example". And then after clicking "Configure" project, the project is listed in Qt Creator.
Now I tried to build the project, which was successful. But when I tried to run the project, I got the following error messages:
Starting C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe...
The program has unexpectedly finished.
C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe crashed.
I didn't see this kind of error before when I was using Qt5.6.2 with MSVC 2013. I also tried the following things:
Reinstall Qt5.8.0 MSVC 2015 using offline installer
Reinstall Qt5.7.1 MSVC 2015 using offline installer
Reinstall Qt5.6.2 MSVC 2015 using offline installer
Reinstall Qt5.8.0 using online installer, in which I chose MSVC 2013 and MSVC 2015
I still kept getting the same error messages.
When I went to the debug folder, double clicked the exe file, it said some Qt dlls were missing. I then manually copied to the debug folder, then the exe can be run with no problem.
Now I want to run app from inside Qt Creator, but not sure what is the issue with Qt Creator 4.2.1. I researched in Google for a few hours, but still cannot find out the reason why Qt Creator cannot run projects even it's own Example projects. (same errors for my own projects)
I feel it must be something to do with Qt creator environment/settings. Anyone has any ideas about this problem?
Update 1:
I tried to use MinGW with Qt Creator, the addressbook example can be run correctly. Looks like it's related to MSVC 2015. I need MSVC 2015, because all other environments don't support webenginewidgets, and I got:
:-1: error: Unknown module(s) in QT: webenginewidgets
Not sure if this is a bug in Qt or Qt creator.
Update 2:
In my Qt Creator, I saw warning icons for MSVC 2013 and MSVC 2015 compilers, please see the screenshots below:
I finally resolved the issue. The reason is that the Windows 10 SDK is missing.
After I download and install all default components of the Windows 10 SDK, everything worked on Windows 7 32bit.
Basically, to make sure we can use Qt5.8.0+ on Windows (including Qt WebEngine), we need to install both:
Visual Studio 2015, and
Windows 10 SDK
I'm late but I've found the main culprit is "ucrtbased.dll".
I didn’t install Windows 10 SDK.
I'm on Windows 7 SP1 x64, Qt 5.9.2 with Visual Studio Build Tools 2015 (v14.0.25420.1) and Windows 8.1 SDK with MS Debugger Tools (CDB) installed. The Release Configuration builds are without any issue but the Debug Configuration exhibits the same crash behavior. The fix is simple. The normal install of Visual Studio Build Tools 2015 with Win8.1 SDK places "ucrtbased.dll" in "C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" for 64-bit and "..\x86\ucrt" for 32-bit builds - even the Windows 10 SDK is not installed. If these are included in system path, or copied to the Qt's current project build folder, the issue is simply resolved.
I am using QtLibrary4.8.4(64 bit), QtCreator2.7.1(64 bit) and MinGW32 4.4.0 for Qt project development.
I can successfully run program but cannot debug it, on debugging the gdb crashes!!!
what can be possible reason. is it a version mismatch? Do I need to upgarde or downgrade gdb??
N.B: I cant use the standalone SDK qt5.0 as I have to stick to version 4.8.4.
Thanks
I encountered the same problem. When using QT you can't use the mingw gdb, instead use the compiled version from the QT-project site.
https://qt-project.org/wiki/QtCreatorBuildGdb
i am new to Qt.
i am using Wnndows 8 with MinGW (gcc 4.7.2)
i have installed QtLibrary 4.8.4(the official site says Qt 4.84 should work with mingw 4.4)
After modified Windows environment variables, i installed Qt Creator 2.6 and setted the kit as well.
now i can compile the example program, but cannot run it, the error message I got is
Starting D:\usr\bin\Qt4\examples\opengl\2dpainting-build-Kit_3_14-Debug\debug\2dpainting.exe...
The program has unexpectedly finished.
D:\usr\bin\Qt4\examples\opengl\2dpainting-build-Kit_3_14-Debug\debug\2dpainting.exe exited with code -1073741502
i met the same problem with Qt 5.0.1 + MinGw 4.7.2 too.
i guess there is something wrong with "opengl", but don't know how to fix it.
please help.
Please try to place all required dlls into the directory where your exe is (see here).
Also make shure; if you are compilung in Debug you need eg. QtCored4.dll, but in release QtCore4.dll.
It all about x32 and x64 architectures,
If you compile cpp files in x64 mode and then link them with x32 qt the problem will occur.
try using the appropriate versions of windows and qt(both x32 or both x64)