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

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

XMLWordPrintable

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

      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);

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved: