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

Cannot set QML flat style

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.5.0 RC, 5.5.0
    • Quick: Controls 1
    • None
    • Windows 8.1 pro
    • WinRT

    Description

      I've tried to use the Flat style on WinRT without any success, the application prints this message and the style is not applied:
      qt.winrtrunner.app: WARNING: Cannot find style "Flat" - fallback: ":/QtQuick/Controls/Styles/Base"

      The same code works correclty with mingw and android packages of 5.5.0 RC.

      The issue can be reproduced creating a new project, the only changes I made to add the Flat style are:

      • add in main.cpp
        qputenv("QT_QUICK_CONTROLS_STYLE", "Flat");
        just before
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
      • add in main.qml
        import QtQuick.Controls.Styles.Flat 1.0
        import QtQuick.Extras 1.0

      I might have missed some step to set correctly the flat style, but I find strange that it does not work on WinRT only

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              liuck Luca Zini
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes