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

    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

        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:
            5 Start watching this issue

            Dates

              Created:
              Updated: