I was looking to do UI development in QML, and I really want it to look native. I found the QtQuick.Controls (http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html), but when I try make a simple application, it tells me that QtQuick.Controls isn't installed.


import QtQuick 2.1
import QtQuick.Controls 1.0

Rectangle {
    height: 200
    width: 200


$ qmlscene main.qml
file:///tmp/main.qml:2 module "QtQuick.Controls" is not installed

Also, I downloaded the source from https://qt.gitorious.org/qt/qtquickcontrols/source/stable, ran qmake && make, but this returned the following output:

cd src/ && ( test -e Makefile || /usr/lib/i386-linux-gnu/qt5/bin/qmake /tmp/qtquickcontrols/src/src.pro -o Makefile ) && make -f Makefile 
make[1]: Går til katalog '/tmp/qtquickcontrols/src'
cd controls/ && ( test -e Makefile || /usr/lib/i386-linux-gnu/qt5/bin/qmake /tmp/qtquickcontrols/src/controls/controls.pro -o Makefile ) && make -f Makefile 
make[2]: Går til katalog '/tmp/qtquickcontrols/src/controls'
g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_XKB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtGui/5.1.1 -I/usr/include/qt5/QtGui/5.1.1/QtGui -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtCore/5.1.1 -I/usr/include/qt5/QtCore/5.1.1/QtCore -I.moc/release-shared -o .obj/release-shared/qquickaction.o qquickaction.cpp
qquickaction.cpp:49:39: fatal error: private/qguiapplication_p.h: No such file or directory
 #include <private/qguiapplication_p.h>

Is there some PPA I could use, or do I have to wait for Trusty to get out, before I can use native controls from Qt? Regards


Qt Quick Controls are available since Qt 5.1 and the Qt 5 version in Ubuntu repositories seems to be Qt 5.0.2. Consequently you cannot use Qt Quick Controls with the current version of Qt5 in Ubuntu repositories.

If you want to use them, you have got 3 options:

  • Using official Qt Project packages for Linux. You can download them here.
  • Waiting a version of Ubuntu whose Qt5 version would be at least Qt 5.1. Trusty Tahr will likely have Qt 5.1 or Qt 5.2 in its repositories.
  • If you are developing something for Ubuntu, you can use the components which are in the Ubuntu SDK. Ubuntu.Components (it is their name) are not the real Qt Quick Controls but they are very similar and if you know how Ubuntu.Components work, you will know how Qt Quick Controls work. For further informations, have a look at the corresponding page on Ubuntu Developer.
| improve this answer | |
  • I think I'll choose your first option. I know there are the Ubuntu.Components, but they are very touch oriented. But thank you very much for a quick and useful answer – LinuxStudent Oct 30 '13 at 18:17
  • Nice choice. Qt Project packages are the best way to get the latest version of Qt and Qt Creator. – air-dex Oct 30 '13 at 21:32
  • Well, it would have been easier if they were just in the Ubuntu repositories, but you're right, almost everything is best, when you get from the creator, end not from some third-party distributor – LinuxStudent Nov 1 '13 at 15:41
  • @air-dex I'm running Trusty right now, but I don't seem to have access to QtQuick.Controls. What might be the issue? I added ubuntu-sdk-team/ppa and canonical-qt5-edgers/qt5-proper PPAs, but no joy :( – Jonah Feb 27 '14 at 20:03
  • @Jonah, did you install qtdeclarative5-controls-plugin – andrewsomething Mar 2 '14 at 16:51

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.