Moving a Qt installation directory

After adding a new drive to my machine and re-installing Windows, the path of my custom-built Qt directory changed from D:\Qt\4.8.3 to E:\Qt\4.8.3. CMake cannot use it in the new location, because it calls qmake -query which returns the old paths which are hard-coded into the Qt binaries.

The solution is simple: create a qt.conf file in the same directory as the qmake binary containing:

Prefix = E:/Qt/4.8.3

The corresponding Qt documentation page has more details.


Comments are closed.