Can I have Qt 4.8.1 and Qt 5.2.1 IDE's in Ubuntu?



  • Hello everybody!

    I have Ubuntu 12.04 LTS, with Qt4, version 4.8.1. It's installed from official repositories with all its associated environments (Qt Creator 2.5.2, and Qt Assistant + Qt Linguist + Qt Designer).

    I would like to install and begin to work with Qt 5.2 (preferably the new 5.2.1 that it's about to be released these days), with new environments (Qt Creator 3.0, and everything else).

    But I have several works in progress (specially an important one) in 4.8.1.

    Can I have both versions installed?
    Or, it would be better to have only one IDE but allowing to develop in both versions?

    what would be the best way to proceed (as far as I have seen, briefly):?

    1.- Download from Qt's official site and install (preferably Offline installer): http://qt-project.org/downloads
    2.- Terminal:

    sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
    sudo apt-get update
    sudo apt-get install qt-sdk
    

    And, what about to maintain that updated?


  • Moderators

    Hi,

    [quote]Can I have both versions installed?[/quote]Yes :)

    [quote]Or, it would be better to have only one IDE but allowing to develop in both versions?[/quote]I think it's best to just use Qt Creator 3.0 for both versions. You can add Qt 4.8 to Qt Creator 3.0:

    [quote]what would be the best way to proceed (as far as I have seen, briefly):?

    1.- Download from Qt’s official site and install (preferably Offline installer): http://qt-project.org/downloads
    2.- Terminal:

    sudo apt-add-repository ppa:ubuntu-sdk-team/ppa sudo apt-get update sudo apt-get install qt-sdk[/quote]Use Option #1.

    I believe Option #2 contains a version that has been modified by Ubuntu.

    [quote]And, what about to maintain that updated?[/quote]Uninstall your old version and download a new version.



  • Well, I finally decided to try to install Qt5. I stumbled into a nightmare of faulting dependencies, requests to uninstall some important (for my projects: PCL 1.6, VTK 5.8, and so on) libraries, and restoring my system to its previous state. 7 hours of work and stress.

    I decided to follow these steps:

    @sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get install ubuntu-sdk
    @

    This went OK... but I saw that some Qt5 components were not installed. Started Qt Creator, and it was still 2.5.2, not the newer 3.0. And it looked somewhat ugly. Googling, I decided to try:

    @sudo apt-get install qtdeclarative5-dev@
    this had some faulting dependencies, so tried
    @sudo apt-get install qtbase5-dev@ with more faulting dependencies.

    Diving into installing these dependencies, I saw that doing so would unistall some important libraries for my actual projects: PCL 1.6, VTK 5.8 (there is still no VTK version suitable for Qt5)...

    Now I got a Qt4 with some non-completely-installed Qt5 components messing around all...

    Finally I got to revert these changes with ppa-purge... but I had to update and upgrade all components again (in example, Qt4 Creator reverted to 2.4.1 instead of 2.5.2...)

    I got really screwed for some hours...

    Would it have been better if I had downloaded Qt5 directly from Qt Project and installed it directly? How would this work with my actual Qt4 installed from Ubuntu official repositories?


  • Moderators

    Hi,

    [quote]I saw that some Qt5 components were not installed. Started Qt Creator, and it was still 2.5.2, not the newer 3.0. And it looked somewhat ugly.[/quote]Yes, distro packages will (almost) always lag behind.

    I don't know what it's like now, but a few years ago Ubuntu changed Qt a lot in their packages, making it not properly compatible with other systems.

    [quote]Would it have been better if I had downloaded Qt5 directly from Qt Project and installed it directly?[/quote]Yes. I recommend that. That's what I did, because I needed new features from Qt 5.2 for my app.

    [quote]How would this work with my actual Qt4 installed from Ubuntu official repositories?[/quote]When you deploy your app, set LD_LIBRARY_PATH for your app. It will then ignore the Qt in your system.

    http://qt-project.org/doc/qt-5/linux-deployment.html#creating-the-application-package



  • Thanks for your comments, JKSH.

    I will give it a try again, when delivery of my actual (and soooo important) project is done. I expect this will be done in a pair of months.

    I think I will uninstall all OpenCV and PCL libraries too, and try to reinstall all again over Qt 5.2


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.