Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
module "QtQuick.Controls" version 2.2 is not installed
Hi, i'm new to Qt and i was following this video tutorial to make a simple to do list app.
In that video, a Qt Quick Controls 2 Application is created, but i noticed was that in my QtCreator version that option was not available.
So, the apparent solution was to import the required prerequisites given by the official documentiation:
import QtQuick.Controls 2.2.qml file.
#include <QtQuickControls2>in the .cpp file.
QT += quickcontrols2in the .pro file.
The thing is when i try tu run it i get the error:
QQmlApplicationEngine failed to load component qrc:/main.qml:3 module "QtQuick.Controls" version 2.2 is not installed
Also i think 'm using the right versions of each module according to the docs:
- Qt: 5.9
- QtQuick: 2.9
- QtQuickControls: 2.2
I appreciate any help or advice.
Markkyboy last edited by
Change the import statement in .qml file to 2.1 instead of 2.2
`import QtQuick.Controls 2.1`
It throws the same error but now asking for the version 2.1.
eyllanesc last edited by eyllanesc
@Zlamir How did you install Qt?
Zlamir last edited by Zlamir
Well, i didn't found an official installing guide for Ubuntu 18.04 so i followed this one.
The steps to install QtCreator were basically:
sudo apt install build-essential sudo apt install qtcreator sudo apt install qt5-default
Then, to use QtQuickControls i was missing some dependencies that i had to install mannually through running:
sudo apt install qtdeclarative5-dev sudo apt install libgles2-mesa-devqtquickcontrols2-5-dev sudo apt install qtquickcontrols2-5-dev
PD: Sry for the late response but i was a little busy with new year stuff.
Kiranachari Shilpi last edited by
Thank you! Installing from the official source actually solved the issue.
Kirsten last edited by Kirsten
I'm using QT_VERSION 5.9.5, both qtdeclarative5-dev and qtquickcontrols2-5-dev are already the newest version (5.9.5-0ubuntu2).
Also added those lines in cpp, qml and pro file as Zlamir mentioned, but still getting the "module "QtQuick.Controls" version 2.2 is not installed" error.
What else should I check?
Edit: Funny thing - switching to QtQuick.Controls 1.4 works..
Alexei.K last edited by
Bug fix for Debian 10 and default Qt5.11:
sudo apt install qml-module-qtquick-controls2