View Full Version : running both Qt3 & Qt4

8th February 2006, 19:45
I have several Qt3 programs that I have put in a "Qt3" directory.
I want too write a new program in a "Qt4" directory. I am not shure how to set it up so that when I am editing a program in the "Qt3" directory I am using the correct librarys and qmake. ("/usr/share/qt3/..." directory)
The same goes for when I am working with a program in the "Qt4" directory. ("/usr/local/Trolltech/....") directory.

Any help would be appreciated.

8th February 2006, 19:59
Most of the time I use Qt4, but sometimes I have to switch over to Qt3. For that purpose I have two short scripts: # qt3
export PATH=/usr/bin:$PATH
export QTDIR=/usr

# qt4
export PATH=~/Qt/bin:$PATH
export QTDIR=~/Qt

They work like this:
$ qmake --version
QMake version: 2.00a
Using Qt version 4.1.0 in /home/users/jacek/Qt/lib
$ . qt3
$ qmake --version
Qmake version: 1.07a (Qt 3.3.5)
Qmake is free software from Trolltech AS.
$ . qt4
$ qmake --version
QMake version: 2.00a
Using Qt version 4.1.0 in /home/users/jacek/Qt/lib

Of course with every change PATH variable gets longer, but if you make only a few changes during one session it isn't a problem.