Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132929

QStyleHints::setColorScheme() doesn't affect the application's theme on Ubuntu

    XMLWordPrintable

Details

    • Linux/X11
    • 738c180c4 (dev), 9c58b6ce1 (6.9), 53fb13456 (dev), a49ca7009 (6.8), 70b8dd2b7 (dev), 7318bfb47 (dev), e9d441253 (dev), bec7201f3 (dev)

    Description

      QStyleHints::setColorScheme() doesn't affect the application's theme on Ubuntu. The method works fine on Windows, but it doesn't seem to work on Ubuntu when trying to force the theme (dark/light) with the code below:
      Qt::ColorScheme color = qApp->styleHints()->colorScheme() == Qt::ColorScheme::Light ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light;
      qApp->styleHints()->setColorScheme(color);

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-132929
          # Subject Branch Project Status CR V

          Activity

            People

              axelspoerl Axel Spoerl
              mahdi.belila Mehdi Belila
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: