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

Nonexistent QT_STYLE_OVERRIDE style prevents main window from being shown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 6.2.2
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Labels:
      None
    • Environment:
      Zorin OS 16
    • Platform/s:
      Linux/X11

      Description

      With Qt6, when the QT_STYLE_OVERRIDE environment variable references an "invalid" (nonexistent) style, it prevents the main window from being shown, and the following generic/non-descriptive message is printed to the terminal:

      qrc:/src/MainApplicationWindow.qml: module "adwaita" is not installed
      

      I believe this is a regression from Qt5: with Qt5, the main window would open and be displayed just fine, and a helpful warning similar to the following would be printed (which is no longer printed with Qt6):

      QApplication: invalid style override 'adwaita' passed, ignoring it.
          Available styles: Windows, Fusion
      

      I stumbled upon this when testing a Qt application on Zorin OS 16, where they hardcode QT_STYLE_OVERRIDE=adwaita but the custom version of Qt I was testing with did not have the adwaita style built into it, and as a result the main window would not be shown.

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            abandali Amin Bandali
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes