Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtQuick.Controls.Material.impl not found
Qt 6.11 is out! See what's new in the release blog

QtQuick.Controls.Material.impl not found

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 2.9k Views 1 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
    CerpherJoe
    wrote on last edited by
    #1

    I'm having difficulty getting to the QuickControls2-material objects. In Designer, When I import 'QtQuick.Controls.Material' no such QML Types are made available to add to the canvas.

    Separately, I 'double-clicked' on the slider.qml file in the directory C:\QT\5.12.6\mingw73_64\qml\QtQuick\Controls.2\Material. This brings up the QML file in QC and indicates that one of the iterms, "handle: SliderHandle" is undefined. It is probably in the QML module "QtQuick.Controls.Material.impl" whose import statement is also flagged "not found".

    Anybody know why this might be the case, or where I can find said module (i.e., the .impl file)?

    Install info:
    Qt Creator 4.11.0
    Based on Qt 5.14.0 (MSVC 2017, 32 bit)
    From revision 017ed74400

    Thanks!
    Joe
    Built on Dec 10 2019 12:27:18

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      What import statements do you use in your QML file?

      Did you add Quick Controls 2 to QT variable in qmake? QT += quickcontrols2

      Which Qt version are you building this project against? (not Qt creator version, but Qt version used in your Kit)

      (Z(:^

      C 1 Reply Last reply
      1
      • sierdzioS sierdzio

        What import statements do you use in your QML file?

        Did you add Quick Controls 2 to QT variable in qmake? QT += quickcontrols2

        Which Qt version are you building this project against? (not Qt creator version, but Qt version used in your Kit)

        C Offline
        C Offline
        CerpherJoe
        wrote on last edited by
        #3

        @sierdzio said in QtQuick.Controls.Material.impl not found:

        QT += quickcontrols2

        Thanks sierdzio for your help.

        I have installed Qt 5.14.0.

        I create the project. Looking for the Material QML types, I import 'QtQuick.Controls.Material 2.12' in the Design view. I have the following import statements in my QML file:

        import QtQuick 2.12
        import QtQuick.Window 2.12
        import QtQuick.Controls.Material 2.0
        import QtQuick.Controls 2.3

        When I hover over these in the Edit view, a bubble indicates: 'Read typeinfo files successfully'.

        However, I do not have access to the Material QML types when I return to the Design window. I do have the 'QT Quick - Controls 2' sub-window that has all of those types available for dragging onto the canvas - but not Material.

        I added the 'QT += quickcontrols2' statement to qmake, saved the files and closed and re-opened the project with no luck.

        When I double-click on the Material 'slider' QML file in the distribution it brings it up in QC with the following:

        import QtQuick 2.12
        import QtQuick.Templates 2.12 as T
        import QtQuick.Controls.Material 2.12
        import QtQuick.Controls.Material.impl 2.12 * QML module not found (QtQuick.Controls.Material.impl).

        This makes me think that file is missing from my (Windows) distribution.

        Thanks,

        Joe

        C 1 Reply Last reply
        0
        • C CerpherJoe

          @sierdzio said in QtQuick.Controls.Material.impl not found:

          QT += quickcontrols2

          Thanks sierdzio for your help.

          I have installed Qt 5.14.0.

          I create the project. Looking for the Material QML types, I import 'QtQuick.Controls.Material 2.12' in the Design view. I have the following import statements in my QML file:

          import QtQuick 2.12
          import QtQuick.Window 2.12
          import QtQuick.Controls.Material 2.0
          import QtQuick.Controls 2.3

          When I hover over these in the Edit view, a bubble indicates: 'Read typeinfo files successfully'.

          However, I do not have access to the Material QML types when I return to the Design window. I do have the 'QT Quick - Controls 2' sub-window that has all of those types available for dragging onto the canvas - but not Material.

          I added the 'QT += quickcontrols2' statement to qmake, saved the files and closed and re-opened the project with no luck.

          When I double-click on the Material 'slider' QML file in the distribution it brings it up in QC with the following:

          import QtQuick 2.12
          import QtQuick.Templates 2.12 as T
          import QtQuick.Controls.Material 2.12
          import QtQuick.Controls.Material.impl 2.12 * QML module not found (QtQuick.Controls.Material.impl).

          This makes me think that file is missing from my (Windows) distribution.

          Thanks,

          Joe

          C Offline
          C Offline
          CerpherJoe
          wrote on last edited by CerpherJoe
          #4

          @CerpherJoe

          I found out what I was doing wrong.

          Simply, a 'style' can be looked at as applying to a basic set of controls and not as it's own set of controls.

          Once configured correctly (below) one simply drags the basic controls to the canvas and they retain their 'un-stylized' look. Once you build and run the program, the resulting window will show the 'stylized' QML type. In my case, a 'slider'.

          To configure a Quick Controls style to work:

          1. Add QT += quickcontrols2 to your project .pro file (thanks @sierdzio !)

          2. Edit your main.cpp file to turn the style on (in my case 'Material'):

             #include <QQuickStyle>
                  QQuickStyle::setStyle("Material");                   (in the main section)
            
          3. Use the Design mode Imports window to add the following to the main.qml file:

            import QtQuick.Controls 2.3
            import QtQuick.Controls.Material 2.0

          4. Add controls to the canvas as desired. Build. You will see the controls now in your chosen style.

          1 Reply Last reply
          2

          • Login

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