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

Style import triggers style change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • Quick: Controls 2
    • None
    • a6548a925 (dev), a013e3386 (6.10), 3ea517b5f (6.9), af08970c3 (tqtc/lts-6.8)

    Description

      According to documentation

      import QtQuick.Controls 

      enables run-time style selection (https://doc.qt.io/qt-6/qtquickcontrols-styles.html#run-time-style-selection)

      However importing style later, e.g. QtQuick.Controls.Universal causes style change anyways. Moreover when imported in another file, leads to mixture of two styles.

      When there is style import, also QQuickStyle::setStyle call and QT_QUICK_CONTROLS_STYLE are ignored. The last import takes precedence.

       

      Another issue is that for compile-time style selection the necessity of using file selectors to adjust specific types is not well documented. It's somehow presented in Gallery Controls example but even there it looks like not handy workaround rather then systematic solution.

      In comparison to Qt5 handling multiple styles seem to be quite problematic and lack of explicit documentation leads to various unexpected behaviors.

       

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              michalc Michał Cieślak
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews