Bull
Bull

Reputation: 758

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

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 installer from Qt's official site and install (preferably offline installer)
  2. Download package and make + make install
  3. 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?

Upvotes: 1

Views: 4980

Answers (2)

Bull
Bull

Reputation: 758

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?

Upvotes: 0

Marek R
Marek R

Reputation: 38161

Yes you can have as many qt version as you want. You can install it in separate directory (in home) and configure Qt Creator to see all version you have. Just download qt-sdk and run it (without sudo), it is quite easy. I recommend to use newer version of Qt creator (has nice new features) and it will automatically configure it self to use system qt and qt shipped with Qt Creator.

System wide you can install both qt4 and qt5 since they use different library names. Only problem can be with qmake which has same name in both versions.

Upvotes: 1

Related Questions