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. [Qt6.7.0] Force light mode has incorrect rendering when system is dark mode
Forum Updated to NodeBB v4.3 + New Features

[Qt6.7.0] Force light mode has incorrect rendering when system is dark mode

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.3k Views
  • 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.
  • P Offline
    P Offline
    Peiqi.Liu
    wrote on 10 May 2024, 16:30 last edited by
    #1

    I update Qt from 6.6.1 to 6.7.0 via vcpkg, I sadly found that my program was automatically switched to dark mode, but I'm not ready to do this. So I forced Qt to switch to bright color mode:

    qputenv("QT_QPA_PLATFORM", "windows:darkmode=0");
    

    So, the interface has become like this:
    f7f2089e-6cb9-4dbb-bdab-4024a8f680b5-image.png

    The dropdown menu of QComboBox is very strange
    c7ae2911-5a4e-414e-821a-17b11fda8642-image.png

    Perhaps there are more rendering issues. Did I forget to set any options or miss something?

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 10 May 2024, 16:35 last edited by
      #2

      You should try with windowsvista style instead the new windows11 style to see if it makes a difference.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      P 1 Reply Last reply 10 May 2024, 16:45
      1
      • C Christian Ehrlicher
        10 May 2024, 16:35

        You should try with windowsvista style instead the new windows11 style to see if it makes a difference.

        P Offline
        P Offline
        Peiqi.Liu
        wrote on 10 May 2024, 16:45 last edited by Peiqi.Liu 5 Oct 2024, 16:50
        #3

        @Christian-Ehrlicher Thank you. Done.

            qApp->setStyle("windowsvista");
        

        Finally, Qt has added the Win11 style! However, it seems there are still some minor issues. It's really exciting to expect QWidget to have a more modern interface.

        J 1 Reply Last reply 16 Oct 2024, 03:00
        1
        • P Peiqi.Liu has marked this topic as solved on 10 May 2024, 16:48
        • P Peiqi.Liu
          10 May 2024, 16:45

          @Christian-Ehrlicher Thank you. Done.

              qApp->setStyle("windowsvista");
          

          Finally, Qt has added the Win11 style! However, it seems there are still some minor issues. It's really exciting to expect QWidget to have a more modern interface.

          J Offline
          J Offline
          Jero Bado
          wrote on 16 Oct 2024, 03:00 last edited by
          #4

          I have the same issue and this code solved it!

          1 Reply Last reply
          0

          1/4

          10 May 2024, 16:30

          • Login

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