Installing Qt 5.x on Ubuntu globally
32,753
That will probably cover it:
sudo apt-get install qtdeclarative5-dev qml-module-qtquick-controls
Comments
-
Ilya over 1 year
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!
-
Ilya over 7 yearsI 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.
-
Velkan over 7 yearsQGraphicsView is in QtWidgets, so it's not useful when working with QtQuick.
-
Ilya over 7 yearsOh, thanks :) I'll try working with QML and write back.
-
Ilya over 7 yearsCompiling a sample QML-Material application produces the following error message: /home/ilya/demo/main.cpp:1: error: QGuiApplication: No such file or directory
-
Velkan over 7 yearsIt should be in
/usr/include/x86_64-linux-gnu/qt5/QtGui/QGuiApplication
. It's inqtbase5-dev
package which is installed byqtdeclarative5-dev
. -
Ilya over 7 yearsThe problem is that on compilation Qt uses headers for Qt 4, although Qt 5 is selected as default both in Qt Creator and systemwide. Now trying to solve.
-
Ilya over 7 yearsThe problem was in "Desktop" configuration. Now solved and things seem to work poperly. Thanks so much for help :)