Pages
API Documentation
On this page

Kirigami::Platform::StyleHints Class

A class providing an attached property to set hints for styles to use. More...

  • Header: #include <Kirigami/Platform/StyleHints>
  • CMake: find_package(KF6 REQUIRED COMPONENTS KirigamiPlatform)
    target_link_libraries(mytarget PRIVATE KF6::KirigamiPlatform)
  • In QML: StyleHints
  • Inherits: QObject

List of all members, including inherited members

Static Public Members

Protected Functions

Detailed Description

This is mostly a class for QtQuick API. However, if you need to trigger specific behaviour in a custom style, you can call setMakeStyleHintsFunction() with a custom factory function to create a custom subclass of this class. The subclass can then respond to property changes of instances of this class.

Member Function Documentation

[virtual protected] void StyleHints::propertyChanged(Kirigami::Platform::StyleHints::ChangedProperty change)

Helper function to notify subclasses of a property change.

Reimplement this in a subclass to handle a change to one of the properties, without the overhead of making separate signal connections for each property.

[static] void StyleHints::setMakeStyleHintsFunction(const std::function<StyleHints *(QObject *)> &function)

Set a different function to be used by qmlAttachedProperties() to create a StyleHints instance.

This is provided to allow different platform plugins to provide their own StyleHints subclass.

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