6

I've been getting the error "module "QtQuick.Controls" version 2.0 is not installed" on Qt Creator 5.6.13, so i upgraded to 5.11.2 and i'm still getting it.

Here's the part causing it:

import QtQuick.Controls 2.0

Thank you for your help.

imad kimouche
  • 133
  • 1
  • 1
  • 10
  • on Windows I have to set `QML2_IMPORT_PATH` correctly, you probably can find the mac-way for that – Amfasis Nov 19 '18 at 12:00
  • 1
    Thank you for the answer, i only have the `QML_IMPORT_PATH` which isn't set in the `.pro`, i can't find an answer for what the variable should contain. I'm a Qt Creator beginner, so thank you for your help. – imad kimouche Nov 19 '18 at 14:40
  • Make sure you are using Qt 5.11.2 by adding `message($$QT_VERSION)` in your pro file – Martin Delille Nov 19 '18 at 15:08

3 Answers3

10

use this command to install it on linux

sudo apt install qml-module-qtquick-controls2
Fatemeh Karimi
  • 914
  • 2
  • 16
  • 23
1

Make sure you activated your Qt kit in Projects > Build & Run as follow:

enter image description here

Martin Delille
  • 11,360
  • 15
  • 65
  • 132
0

Ok so, I was building with the Qt Creator 5.6.3 compiler.

Projects => Build & Run => change to the corresponding kit.

Martin Delille
  • 11,360
  • 15
  • 65
  • 132
imad kimouche
  • 133
  • 1
  • 1
  • 10