Uninstall Older QT version problem
-
Greetings.
This is my first post, and as I had to create an account to reinstall QT 5.14 I decided while I wait for My reinstallation to download I would make a query. I use QT for personal use and use it under the open source model.
I had two versions of QT installed 5.12 and 5.14. After installing 5.14 about two months ago and finding no problems with it, I decided to uninstall version 5.12 through the windows 10 apps maintenance where I usually uninstall apps as it was using 39 gigs of disk space I wanted to free up.
After QT 5.12 was successfully uninstalled I went back into my current visual studio 19 project that was configured to use and compile a QT project that I last did so yesterday to make sure all was still fine, and remove any references to 5.12.
I found that all references to QT had to be reconfigured, and I had to redirect the project to the correct QT 5.14 directory path, as with all QT modules being used . After doing so, the project was able to be recompiled. I tested the debug version of the application I was creating and got this message
Program <progam pathname>
Module 5.14.0
File: kernal\qguiapplication.cpp
line: 1228"Application failed to start because platform plugin could not be initialised. Reinstalling the application may fix the problem.
So My question is this. What is the correct procedure or method to uninstall an older version of QT without disrupting and causing unwanted issues like this? I suspect that uninstalling 5.12 deleted data or files elsewhere that all QT installations use and all versions use.
In desperation I have decided not to waste time trying to figure out what went wrong and just reinstall 5.14 and hope that will fix things. In hindsight, this may not be bad as I have only selected what I need and not do a full install this time, saving some disk. Could any one tell me what went wrong? For Future, should I first unistall existing QT versions before installing updated versions?
I would appreciate any help and give thanks in advance.
-
@dominion said in Uninstall Older QT version problem:
What is the correct procedure or method to uninstall an older version of QT
How did you install Qt? Using offline or online installer? When using online installer then use Qt Maintenance Tool inside your Qt installation directory to remove/add Qt versions.
-
Thank you for your interest.
I used the online installer to install QT 5.12.
It seemed to be the QT maintenance tool that was called when I uninstalled 5.12 as a message was displayed that this was being used.
I have attempted reinstall QT 5.14 as I have done with the on line installer as in the past, but found it to be so slow that it would take a couple of days to complete, so I had to resort to the offline Installer instead which took just over an hour.
After re-installation, the same problem still occurs. I cannot use visual studio 19 or even 17 to even start a basic QT empty default project with just a QTMainWindow to display without getting this error when I click on the created .exe file. Even If I create a release version, this occurs.
The same problem occurs with using the QT creator program to compile one of the QT examples given. However, If I press the run button on QT Creator, no problem getting the example to run. But here is the weird part. If I copy and leave the needed QT .dll files in the directory where the .exe file resides, and press the run button in QT Creator, the error mentioned above appears. If I remove the required .dll files, the example file runs from QTCreator.
I have found the same in Visual studio if I click on the run debugger button.
There is something seriously wrong. I have no confidence now that QT is a solution to create free, open source, stand alone applications. I like QT a lot and have devoted a lot of time and effort with much success in the past 15 months. But If there is some kind of mechanism that requires applications to only be able to run from QT Creator, or need QT to be installed on ones computer to us a QT application, then I feel I have wasted all that time as I was very close to choosing imGUI for creating the GUI, but QT has so much more to offer.
So I can only now assume that the culprit is the maintenance tool and that something was deleted or changed like an environmental variable that was not reset when I re-installed 5.14.
I hope there is an easy fix, like a project settings option that I am unaware of, I think I will try and reinstall 5.12. Maybe that will solve things, but I have a feeling it won't.
If any help can be given , I will much appreciate it.
-
OK, Problem solved.
It was an environment variable setting that was the cause of this problem, or rather two.
I had a path setting for the old 5.12.1/msvc2017_64/bin directory and an environmental variable QTDIR set to the old 5.12.1/msvc2017_64 directory. These have now been manually reset to the current 5.14.1 directories.
I will need to make a note of this for any future upgrades I may use, or uninstalling QT. I have been unknowingly been using QT 5.12.1 dlls when executing 5.14 compiled code. It may explain a few crashes I had in starting up my applications from time to time.
I cannot remember if I had created these myself from something I had read or if these were set when I installed 5.12.1.
So for any one reading this, I hope it may help when uninstalling QT and installing updates if they are having the same problem occur.