Installing Qt on Ubuntu

qt
software
build

#1

If you use Ubuntu, first uninstall Canonical’s version of Qt, which was developed to support it’s now-defunct phone product.

Uninstall using the Software Center. Then look under your home directory for any folders beginning with ‘Qt’. Manually delete these files & directories, reboot to rebuild the filename ndex database (though technically not necessary for Qt install).

Then install the official Qt version from here: https://www.qt.io/download/

NOTE 2017 Oct 12: This thread is outdated. Not necessary to uninstall Qt. See Install Qt 5 on Ubuntu - Qt Wiki for latest information.


#2

@slpencer, do you know something i don’t know? Because i don’t see any difference between Canonical’s version of Qt and the official. I have been using Canonical’s all this time.


#3

Canonical’s version several years ago did not work correctly with QtCreator, and it wasn’t possible to upgrade to current versions from the official source at QtCompany. There still appear to be issues. As recently as this past December we received email from a user (Abishek) to the Valentina contact address about not being able to upgrade to the version of Qt required to build Valentina on Ubuntu. Abishek resolved the problem by installing qt-sdk and qmake, which effectively replaced all of Canonical’s Qt.

So either way will fix it:

  1. uninstall Ubuntu’s Qt and reinstall the latest version of Qt from official source, or
  2. overwrite Ubuntu’s Qt by installing qt-sdk and qmake from official source

The downside of installing qt-sdk is that qt-sdk is huge, it includes IDE, revision control, debugging and documentation.

UPDATE 2017 Oct 12: there is a better way to do this in Ubuntu 14.04 & 16.04: Install Qt 5 on Ubuntu - Qt Wiki.


#4

Why i did not hear about this? Abhishek probably used Ubuntu 12.04 or older.

My experience is different.

Yes, it is true.


#5

I have sent some of Abishek’s email thread back to you, as you were on the original email distribution. You’ve seen this, but it’s easy to forget sometimes.


#6

User @abhishek’s thread about difficulties with installing QtCreator over the Ubuntu Qt distribution was lost during the transfer from Google groups to this Discourse forum :cry: I have my copies of each post in email, but they’re difficult to piece together as a complete post.


#7

Here’s the latest information on installing Qt on Ubuntu 14.04 & 16.04: https://wiki.qt.io/Install_Qt_5_on_Ubuntu

This takes care of issues regarding OpenGL (which aren’t installed by default anymore) and how to set up QtCreator with a link on the desktop.