Results 1 to 3 of 3

Thread: Running QT3 and QT4 on the same system?

  1. #1

    Default Running QT3 and QT4 on the same system?

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Running QT3 and QT4 on the same system?

    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.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running QT3 and QT4 on the same system?

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.