Those wanting to play with QT will probably end up installing QT Creator package. While, strictly speaking, you can make QT applications also without it, a lot of things get much simpler if you use it - most noticeable example being GUI design.
After download, installation is really simple:
chmod +x ~/Downloads/qt-unified-linux-x64-3.0.6-online.run
sudo ~/Downloads/qt-unified-linux-x64-3.0.6-online.run
However, I wouldn’t write this post if it was so easy.
Indeed, in Ubuntu, this will seemingly install everything until you try to make a project in QT Creator. There you’ll be stopped with “No valid kits found.” message. Cause of this is missing QT version selection as None will be only option on a clean system. To get offered more, a few additional packages are required:
sudo apt-get install --yes qt5-default qtdeclarative5-dev libgl1-mesa-dev
Once these packages are installed, you’ll be able to modify your Desktop kit definition and select correct version. Finally, you can finish creating the project and get onto coding.