Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If you want to develop with QML 2.0 and Qt5, the base packages don't seem to exist in repository for 12.04. What PPA should I add? Is it a binary installer? a compile the toolkit yourself?

Those aren't separate questions, they're just possible tracks to an answer.

I'm asking because if you want to develop for Ubuntu Phone, but still have a rock solid LTS development box, this seems the appropriate path.

How can I install Qt 5.x on 12.04 LTS?

share|improve this question

1 Answer 1

up vote 21 down vote accepted

This can be done by adding the following PPA to your system:

ppa:ubuntu-sdk-team/ppa Launchpad logo (Click here for instructions on using PPAs.)

You can usually do this with the following commands:

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

The next step is to install the necessary packages for Qt5 / QML 2.0 development. You can do that by running these command:

sudo apt-get install qtdeclarative5-dev

This will install the headers / libraries necessary for development with desktop Qt and QML. You will also probably want to grab the latest release of Qt Creator from this page.

I've found that Qt Creator sometimes has problems finding your new Qt5 installation. If that is the case, perform these steps:

  1. open it up and go to Tools->Options
  2. click the "Build & Run" section in the left menu
  3. click the "Qt Versions" tab
  4. click "Add..." and enter the location that corresponds with your OS:

    32-bit: /usr/lib/i686-linux-gnu/qt5/bin/qmake
    64-bit: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

share|improve this answer
1  
Adding that repository now suggests you should use "apt-add-repository ppa:ubuntu-sdk-team/ppa" instead. –  Terence Eden Aug 5 '13 at 12:14
1  
Is there a way to install qt 5.2 with a similar method? I think the version provided on the PPA is 5.02 –  Ezequiel Mar 21 at 23:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.