Pages
API Documentation
On this page

KWindowInsetsController Class

Access to window insets colors. This class was introduced in Qt 6.7. More...

  • Header: #include <KWindowInsetsController>
  • Since: Qt 6.7
  • CMake: find_package(KF6 REQUIRED COMPONENTS GuiAddons)
    target_link_libraries(mytarget PRIVATE KF6::GuiAddons)
  • In QML: WindowInsetsController
  • Inherits: QObject

List of all members, including inherited members

Properties

Detailed Description

On most platforms this does nothing, on Android it allows to customize the (top) status bar and (botton) navigation bar background colors, e.g. to match the current window or application colors.

Note that the foreground colors on Android are automatically chosen based on the background color.

Component.onComplete: {
    WindowInsetsController.statusBarBackgroundColor = Kirigami.Theme.backgroundColor;
    WindowInsetsController.navigationBarBackgroundColor = Kirigami.Theme.backgroundColor;
}

Property Documentation

Background color of the navigation bar.

Access functions:

  • QColor navigationBarBackgroundColor() const
  • void setNavigationBarBackgroundColor(const QColor &color)

Notifier signal:

  • void navigationBarBackgroundColorChanged()

statusBarBackgroundColor : QColor

Background color of the status bar.

Access functions:

  • QColor statusBarBackgroundColor() const
  • void setStatusBarBackgroundColor(const QColor &color)

Notifier signal:

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