Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16145

Unable to locate the Material and Universal style imports

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • Qt Creator 4.0.0
    • Qt Creator 4.0.0-rc1
    • Quick / QML Support
    • None
    • The latest Qt 5.7 branch

    Description

      Hi, we're done renaming Qt Labs Controls to Qt Quick Controls 2. The new install tree is:

      QT_INSTALL_QML/
      qml
      └── QtQuick
          ├── Controls.2
          │   ├── Xxx.qml
          │   ├── designer
          │   ├── libqtquickcontrols2plugin.so
          │   ├── Material
          │   │   ├── Xxx.qml
          │   │   ├── libqtquickcontrols2materialstyleplugin.so
          │   │   └── qmldir
          │   ├── plugins.qmltypes
          │   ├── qmldir
          │   └── Universal
          │       ├── Xxx.qml
          │       ├── libqtquickcontrols2universalstyleplugin.so
          │       └── qmldir
          └── Templates.2
              ├── libqtquicktemplates2plugin.so
              ├── plugins.qmltypes
              └── qmldir
      

      Notice how the style plugins are installed to qml/QtQuick.Controls.2/Material and qml/QtQuick.Controls.2/Universal. Here's the QML engine patch that made it possible: https://codereview.qt-project.org/#/c/155425/.

      Try the following snippet with the latest Qt 5.7 branch:

      // main.qml
      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Controls.Material 2.0 // <== "QML module not found."
      
      ApplicationWindow {
          visible: true
      
          Button {
              text: "Button"
              highlighted: true
              anchors.centerIn: parent
              Material.accent: Material.Red
          }
      }
      

      Attachments

        Activity

          People

            mabenell Marco Benelli
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: