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. [SOLVED] Set whether qmlscene (Qt Quick 2 application) should use the system's standard colors, fonts, etc. (like QApplication::desktopSettingsAware)
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Set whether qmlscene (Qt Quick 2 application) should use the system's standard colors, fonts, etc. (like QApplication::desktopSettingsAware)

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 2.3k 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.
  • R Offline
    R Offline
    rominf
    wrote on last edited by
    #1

    I want my Qt Quick 2 program to use default Qt Fusion Style, but not system style. When I had Qt Quick 2 Application ("see this thread":https://qt-project.org/forums/viewthread/27405/) I used this line in main.cpp:
    @QApplication::setDesktopSettingsAware(false);@

    How can I specify that in qmlscene? Is that possible?
    I really like system integration by default but my teacher hates my dark programs (I have KDE with Obsidian Coast color scheme).

    UPD: it is not possible

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      With qmlscene you can't do this. You can pass "-style fusion" as a command line argument to qmlscene to force fusion but it would still use your system palette. But for this particular use case, why don't you just prototype your qml project using qmlscene and simply create a basic application launcher as the last step before handing off your application?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rominf
        wrote on last edited by
        #3

        Thank you, Jens.

        "why don’t you just prototype your qml project using qmlscene and simply create a basic application launcher as the last step before handing off your application?"

        I thought about this. But I had hope of some undocumented magic qmlscene option. :) But it is quite understandable that such things as using system palette, inclusion of system independent styles into binary depends on compile time options, not on run time ones. And as qmlscene is already compiled I cannot change those appearance options.
        I accept your suggestion. Thank you!

        1 Reply Last reply
        0
        • F Offline
          F Offline
          frankiefrank
          wrote on last edited by
          #4

          Thanks to this post I understood why I'm seeing a different slider in my full "fusion" styled application, than in a small QML side project. Thanks!

          "Roads? Where we're going, we don't need roads."

          1 Reply Last reply
          0
          • F Offline
            F Offline
            frankiefrank
            wrote on last edited by
            #5

            Thanks to this post I understood why I'm seeing a different slider in my full "fusion" styled application, than in a small QML side project. Thanks!

            "Roads? Where we're going, we don't need roads."

            1 Reply Last reply
            0

            • Login

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