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



  • 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



  • 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?



  • 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!



  • 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!



  • 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!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.