Pages
API Documentation
On this page

KColorSchemeWatcher Class

Information about system-wide color preferences. Use QStyleHints and QAccessibilityHints instead. This class is deprecated since 6.22. We strongly advise against using it in new code. More...

  • Header: #include <KColorSchemeWatcher>
  • CMake: find_package(KF6 REQUIRED COMPONENTS GuiAddons)
    target_link_libraries(mytarget PRIVATE KF6::GuiAddons)
  • Inherits: QObject
  • Status: Deprecated since 6.22

List of all members, including inherited members

Public Types

Public Functions

Signals

This class is deprecated since 6.22. We strongly advise against using it in new code.

Detailed Description

Member Type Documentation

enum KColorSchemeWatcher::ColorPreference

Encodes the color preference of the user to be used by applications as configured in the system settings. On some systems not all values are returned, e.g. PreferHighContrast is currently only returned on Windows.

Constant Value Description
KColorSchemeWatcher::NoPreference 0 No preference available
KColorSchemeWatcher::PreferDark 1 The user prefers a dark color scheme
KColorSchemeWatcher::PreferLight 2 The user prefers a light color scheme
KColorSchemeWatcher::PreferHighContrast (since Qt 6.13) 3 The user prefers a system-provided high-contrast color scheme

See also systemPreference

Member Function Documentation

KColorSchemeWatcher::KColorSchemeWatcher(QObject *parent = nullptr)

KColorSchemeWatcher::ColorPreference KColorSchemeWatcher::systemPreference() const

The system-wide color preference.

[signal] void KColorSchemeWatcher::systemPreferenceChanged()

Emitted when systemPreference changes.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.