Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 5.5 RC cannot set flat style
Forum Updated to NodeBB v4.3 + New Features

Qt 5.5 RC cannot set flat style

Scheduled Pinned Locked Moved QML and Qt Quick
styles5.5qtquick
3 Posts 1 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    liuck
    wrote on 26 Jun 2015, 08:10 last edited by
    #1

    I am trying to use the QML flat style with qt 5.5 community.
    I understood from the Alpha release notes - http://blog.qt.io/blog/2015/03/17/qt-5-5-alpha-available/ - that the flat style should be included in the community edition of QT 5.5. It is also mentioned on this post on the blog: https://blog.qt.io/blog/2015/06/04/qt-5-5-computer-vision-and-the-nitrogen6x/

    I use

    qputenv("QT_QUICK_CONTROLS_STYLE", "Flat");
    

    in main.cpp, but the style is not applied. I think that this is the correct way to set the style since I can change it by setting "Desktop" instead of "Flat".

    Looking into the QT installation directory I see that there is a directory named mingw492_32\qml\QtQuick\Controls\Styles\Flat , but it contains only two dlls and a qmldir file. The Base and desktop directories instead contain about 40 qml files.

    How can I use the flat style in Qt 5.5 community?

    Thanks!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      liuck
      wrote on 26 Jun 2015, 09:45 last edited by
      #2

      I've succeded to use the flat style by adding

      import QtQuick.Controls.Styles.Flat 1.0
      

      It works with the QT 5.5 RC mingw package, however I cannot see ComboBox. Each time a combo box is shown this error appear:

      qrc:/ExtrasImports/QtQuick/Controls/Styles/Flat/ComboBoxStyle.qml:39:1: module "QtQuick.Extras.Private" is not installed
      qml: Failed to load Style for ComboBox_QMLTYPE_124(0x2c2dc258)
      

      The same behaviour holds targeting an android device, but the same code does not work with QT 5.5 RC package and this error is shown when the app starts

      qt.winrtrunner.app: WARNING: Cannot find style "Flat" - fallback: ":/QtQuick/Controls/Styles/Base"
      
      1 Reply Last reply
      0
      • L Offline
        L Offline
        liuck
        wrote on 26 Jun 2015, 10:05 last edited by liuck
        #3

        I was missing
        import QtQuick.Extras 1.0

        On android and Windows now it works fine, it does not work with winrt

        1 Reply Last reply
        0

        3/3

        26 Jun 2015, 10:05

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved