PDA

View Full Version : Running QT3 and QT4 on the same system?


milonguero
26th April 2007, 03:54
Hi all,

The environment variable QTDIR currently points to QT 3.3, and I was wondering about what would happen if I install 4.2 in a new directory (of course). If I run the install, will it mess linking for QT 3.3 projects? At the moment, it looks like there'd be quite a bit of work before I could migrate fully to 4.2, so a short term fix of running both would be nice.

Regards,
Milonguero

high_flyer
26th April 2007, 10:16
Qt4 does not use the QTDIR any more.
So in that respect you can install both versions with no problem.
However, you will have a minor problem with qmake.
So you will have to set your PATH with the version you want to work with as defalut first, and after it the other Qt version location.
Another solution is to explicitly call the right qmake.

Brandybuck
26th April 2007, 19:38
Qt 4 relies on qmake, which knows where everything is installed to. As long as you don't move stuff around after it has been installed, all you need to do is make sure you use the right qmake.

p.s. Of course, the real world is hardly this simple. A lot of Linux distros have the habit of splitting Qt 4 up, renaming the pieces, and scattering them helter skelter across the directory hierarchies. So sometimes you run into conflicts. Just yesterday a customer's qmake generated Makefile was finding the right includes, libraries and moc, but using the wrong uic.Th us, you need to make sure that the correct qmake, moc and uic are first in your search path.