Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Issues importing QtQuick.Controls 6.0
Forum Updated to NodeBB v4.3 + New Features

Issues importing QtQuick.Controls 6.0

Scheduled Pinned Locked Moved Unsolved Qt 6
7 Posts 3 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChiefyChief
    wrote on 15 Jul 2021, 15:28 last edited by ChiefyChief
    #1

    Hello all,

    I'm currently implementing a QML application which is interfacing with C++ for the underlying logic. I've been able to use QtQuick within the QML by importing using import QtQuick 6.0 and everything works well. However, as soon as I try to do import QtQuick.Controls 6.0 it just complains that:

    qrc:/qml/Warden.qml:2:1: module "QtQuick.Controls" is not installed
         import QtQuick.Controls 6.0
         ^
    

    when attempting to run. Is there anything I'm missing? I'm confused on why QtQuick works but not any underlying plug ins?

    I'm running this within CLion and CMake with Qt 6.1 on Windows.

    This is the current CMake library stuff:

    set(QT_VERSION 6)
    set(REQUIRED_LIBS QuickControls2 QmlModels OpenGL Qml Quick QuickWidgets Gui Widgets Core)
    set(REQUIRED_LIBS_QUALIFIED Qt::QuickControls2 Qt::OpenGL Qt::QmlModels Qt::Qml Qt::Quick Qt::QuickWidgets Qt::Gui Qt::Widgets Qt::Core)
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      chilarai
      wrote on 17 Jul 2021, 05:55 last edited by
      #2

      Not sure but did you mention the following in the .pro file

      QT += quick quickcontrols2
      
      C 1 Reply Last reply 18 Jul 2021, 13:21
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 17 Jul 2021, 06:20 last edited by
        #3

        Hi and welcome to devnet,

        Based on the doc, no versioning is needed.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply 18 Jul 2021, 13:35
        1
        • C chilarai
          17 Jul 2021, 05:55

          Not sure but did you mention the following in the .pro file

          QT += quick quickcontrols2
          
          C Offline
          C Offline
          ChiefyChief
          wrote on 18 Jul 2021, 13:21 last edited by
          #4

          @chilarai This is done within CMake so not .pro file is included as far as I'm aware

          1 Reply Last reply
          0
          • S SGaist
            17 Jul 2021, 06:20

            Hi and welcome to devnet,

            Based on the doc, no versioning is needed.

            C Offline
            C Offline
            ChiefyChief
            wrote on 18 Jul 2021, 13:35 last edited by
            #5

            @SGaist Thank you for the welcome

            I've attempted with and without the versioning, again without versioning for import QtQuick without the versioning and with the versioning and works for both. However, with import QtQuick.Controls or import import QtQuick.Controls 6.0 it doesn't work. All of the dlls are still present Qt6QuickControls2.dll is in the right place.

            I've followed the documentation but I still feel like I'm missing something basic. All the CMake reflects that in the documentation too.

            Is there anything I need to include on the C++ side of things for the QML to show up properly? A particular #include?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 18 Jul 2021, 18:31 last edited by
              #6

              How did you install Qt 6 ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              C 1 Reply Last reply 18 Jul 2021, 19:36
              0
              • S SGaist
                18 Jul 2021, 18:31

                How did you install Qt 6 ?

                C Offline
                C Offline
                ChiefyChief
                wrote on 18 Jul 2021, 19:36 last edited by
                #7

                @SGaist Using the Qt online installer via the Qt website. Is there a particular check field I need to make sure I have installed?

                1 Reply Last reply
                0

                7/7

                18 Jul 2021, 19:36

                • Login

                • Login or register to search.
                7 out of 7
                • First post
                  7/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved