Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85825

Default style is used instead of Material

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • 6.0
    • 6.0
    • Quick: Controls 2
    • None

    Description

      With this qtquickcontrols2.conf:

      [Controls]
      Style=Material
      

      and this QML:

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          minimumWidth: 200
          minimumHeight: 200
          visible: true
      
          ComboBox {
              model: 100
          }
      }
      

      I get the Default style ComboBox:

      instead of Material:

      With

      QT_LOGGING_RULES=qt.quick.controls.style=true;qt.quick.controls.styleplugin=true;qt.quick.controls.qtquickcontrols2plugin=true
      

      I get this output:

      11:48:20: Starting /home/mitch/dev/build-slate-qt5_dev2_debug-Debug/Debug/install-root/usr/local/Slate ...
      Failed to load qt_* translation for locale "en_GB" from "/home/mitch/dev/qt-dev2-debug/qtbase/translations"
      qt.quick.controls.style: resolving style
      qt.quick.controls.style: done resolving:
          style="Material"
          custom=false
          resolved=true
          fallbackStyle=""
          fallbackMethod=":/qtquickcontrols2.conf"
          configFilePath=":/qtquickcontrols2.conf"
      qt.quick.controls.qtquickcontrols2plugin: QtQuickControls2Plugin() - style: "Material" effective style: "Material" fallback style: "" effective fallback style: "Default"
      qt.quick.controls.qtquickcontrols2plugin: creating QQuickTheme instance to be initialized by style-specific theme of "Material"
      qt.quick.controls.qtquickcontrols2plugin: calling qmlRegisterModuleImport() to register fallback style with uri QtQuick.Controls moduleMajor -1 import "QtQuick.Controls.Default" importMajor -2
      qt.quick.controls.qtquickcontrols2plugin: calling qmlRegisterModuleImport() to register primary style with uri "QtQuick.Controls" moduleMajor -2 import "QtQuick.Controls.Material" importMajor -2
      qt.quick.controls.qtquickcontrols2plugin: registerTypes() called with uri QtQuick.Controls
      qt.quick.controls.styleplugin: registerTypes called with uri QtQuick.Controls.Material; plugin name is "Material"
      qt.quick.controls.styleplugin: registerTypes called with uri QtQuick.Controls.Default; plugin name is "Default"
      

      This also applies to the Imagine style. The Fusion and Universal styles work fine.

      Module SHA-1s:

      Entering 'qtbase'
      commit 7c861a36f98972b64379589477930e2e894b0d72
      Entering 'qtdeclarative'
      commit 02caa659dad5e28b95029e28a40912cabeaf6a9b
      Entering 'qtquickcontrols2'
      commit 28373abd5a6344c3c6d8b173c373657dd0d95707
      

      Note that for qtquickcontrols2 you have to checkout https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/307865/ and then cherry-pick https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/308053.top.

      Attachments

        1. qtbug85825.zip
          2 kB
        2. qtbug85825-actual.png
          qtbug85825-actual.png
          3 kB
        3. qtbug85825-expected.png
          qtbug85825-expected.png
          3 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ulherman Ulf Hermann
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes