Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to force light or dark mode in app on macOS or Windows?
Forum Updated to NodeBB v4.3 + New Features

How to force light or dark mode in app on macOS or Windows?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 850 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.
  • M Offline
    M Offline
    mjsmithers
    wrote on last edited by
    #1

    Hi,

    I'm testing moving to QML and the "Fusion" style; it seems the most consistent on both macOS and Windows.

    In main() I can use

    QQuickStyle::setStyle("Fusion");
    

    to set the style. Is there a way to force the dark or light mode, rather than it just following the operating system setting?

    Michael

    T 1 Reply Last reply
    0
    • M mjsmithers

      Hi,

      I'm testing moving to QML and the "Fusion" style; it seems the most consistent on both macOS and Windows.

      In main() I can use

      QQuickStyle::setStyle("Fusion");
      

      to set the style. Is there a way to force the dark or light mode, rather than it just following the operating system setting?

      Michael

      T Offline
      T Offline
      thomthom
      wrote on last edited by
      #2

      @mjsmithers did you figure out how to explicitly control light or dark mode independent of the system? I'm having the same issue.

      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