Hello everyone! :)

I need to install Qt 5 globally on Ubuntu to be able to use QML libraries like Kirigami. However, the wast majority of Google search results tell how to install it locally (as a folder) from Qt's official website. How can I install Qt 5.x as a set of packages to get something functionally equivalent to Qt installation from qt.io?
I use Ubuntu 16.04.1 on my x64 PC.

Thanks in advance!

1 Answer 1


That will probably cover it:

sudo apt-get install qtdeclarative5-dev qml-module-qtquick-controls
  • I have previously installed some other Qt packages, so both ones you've mentions are already installed. However, when I try to launch a sample app ("Stickman"), it says "/home/ilya/stickman/graphicsview.h:44: error: QtWidgets/QGraphicsView: No such file or directory". Also, Qt from qt.io comes with lots of QML samples.
    – Ilya
    Sep 5, 2016 at 14:16
  • QGraphicsView is in QtWidgets, so it's not useful when working with QtQuick.
    – Velkan
    Sep 5, 2016 at 16:49
  • Oh, thanks :) I'll try working with QML and write back.
    – Ilya
    Sep 5, 2016 at 16:53
  • Compiling a sample QML-Material application produces the following error message: /home/ilya/demo/main.cpp:1: error: QGuiApplication: No such file or directory
    – Ilya
    Sep 5, 2016 at 17:14
  • It should be in /usr/include/x86_64-linux-gnu/qt5/QtGui/QGuiApplication. It's in qtbase5-dev package which is installed by qtdeclarative5-dev.
    – Velkan
    Sep 5, 2016 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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