Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQStyleKitPropertyGroup Class Reference

#include <qqstylekitcontrolproperties_p.h>

Inheritance diagram for QQStyleKitPropertyGroup:
Collaboration diagram for QQStyleKitPropertyGroup:

Public Types

enum class  EmitFlag { AllProperties , Colors }

Public Member Functions

 QQStyleKitPropertyGroup (QQSK::PropertyGroup group, QObject *parent)
 \qmltype ControlStyleProperties \inqmlmodule Qt.labs.StyleKit
template<typename T>
T styleProperty (QQSK::Property property, QQSK::Property alternative=QQSK::Property::NoProperty) const
template<typename T>
T styleProperty (QQSK::Property property, const T &defaultValue) const
template<typename T>
bool setStyleProperty (QQSK::Property property, T value)
bool isDefined (QQSK::Property property) const
template<typename SUBCLASS>
void handleStylePropertyChanged (void(SUBCLASS::*changedSignal)())
template<typename SUBCLASS, typename... CHANGED_SIGNALS>
void handleStylePropertiesChanged (CHANGED_SIGNALS... changedSignals)
template<typename T>
T * lazyCreateGroup (T *const &ptr, QQSK::PropertyGroup group) const
bool isControlProperties () const
QQStyleKitControlProperties * controlProperties () const
QQSK::PropertyPathFlags pathFlags () const
QQStyleKitPropertyGroupSpace groupSpace () const
void emitChangedForAllStylePropertiesRecursive (EmitFlags emitFlags)
Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
QString objectName () const
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
QBindable< QString > bindableObjectName ()
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
bool isQmlExposed () const noexcept
 Returns whether the object has been created by the QML engine or ownership has been explicitly set via QJSEngine::setObjectOwnership().
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
QThread * thread () const
 Returns the thread in which the object lives.
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
void killTimer (int id)
 Kills the timer with timer identifier, id.
void killTimer (Qt::TimerId id)
template<typename T>
T findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
template<typename T>
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
template<typename T>
T findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename T>
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const QObjectList & children () const
 Returns a list of child objects.
void setParent (QObject *parent)
 Makes the object a child of parent.
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
bool disconnect (const QObject *receiver, const char *member=nullptr) const
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
bool setProperty (const char *name, QVariant &&value)
QVariant property (const char *name) const
 Returns the value of the object's name property.
QList< QByteArray > dynamicPropertyNames () const
QBindingStorage * bindingStorage ()
const QBindingStorage * bindingStorage () const
QObject * parent () const
 Returns a pointer to the parent object.
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.

Protected Member Functions

virtual void forEachExistingNestedGroup (const std::function< void(QQStyleKitPropertyGroup *)> &f) const
Protected Member Functions inherited from QObject
QObject * sender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
int senderSignalIndex () const
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
bool isSignalConnected (const QMetaMethod &signal) const
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
virtual void connectNotify (const QMetaMethod &signal)
virtual void disconnectNotify (const QMetaMethod &signal)
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)

Protected Attributes

QQStyleKitPropertyGroupSpace m_groupSpace
QQSK::PropertyPathFlags m_pathFlags = QQSK::PropertyPathFlag::NoFlags
Protected Attributes inherited from QObject
QScopedPointer< QObjectData > d_ptr

Additional Inherited Members

Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
static bool disconnect (const QMetaObject::Connection &)
 Disconnects connection and resets it to \l{QMetaObject::Connection::operator bool()}{invalid}.
static bool disconnect (QMetaObject::Connection &)
static bool disconnect (QMetaObject::Connection &&conn)
 Disconnect a connection.
template<typename Func1, typename Func2>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
template<typename Func1>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
Properties inherited from QObject
QString objectName
 the name of this object

Detailed Description

Definition at line 41 of file qqstylekitcontrolproperties_p.h.

Member Enumeration Documentation

◆ EmitFlag

Enumerator
AllProperties 
Colors 

Definition at line 46 of file qqstylekitcontrolproperties_p.h.

Constructor & Destructor Documentation

◆ QQStyleKitPropertyGroup()

QT_BEGIN_NAMESPACE QQStyleKitPropertyGroup::QQStyleKitPropertyGroup ( QQSK::PropertyGroup group,
QObject * parent )

\qmltype ControlStyleProperties \inqmlmodule Qt.labs.StyleKit

Defines the stylable properties for a control.

ControlStyleProperties defines the stylable properties for a control: the visual building blocks \l background, \l indicator, \l handle, and \l text, as well as layout properties like \l padding, \l spacing, and \l transition.

The style properties are accessed through inherited types such as \l ControlStyle and \l StyleReader.

\labs

See also
ControlStyle, StyleReader, ControlStateStyle, DelegateStyle

\qmlproperty DelegateStyle ControlStyleProperties::background

Grouped property for styling the background of a control.

The background delegate is typically the main visual rectangle behind the control. Use it to set \l {DelegateStyle::color}{colors}, \l {DelegateStyle::border}{borders}, \l {DelegateStyle::radius}{radii}, \l {DelegateStyle::shadow}{shadows}, \l {DelegateStyle::gradient}{gradients}, and \l {DelegateStyle::image}{images}.

Note
The default \l {Style.fallbackStyle}{fallback style} sets {background.visible} to false for controls that typically should not draw a background, such as \l [QtQuickControls]{CheckBox}, \l [QtQuickControls]{RadioButton}, and \l [QtQuickControls]{Slider}. To show their background, set {background.visible} to true explicitly.

\qmlproperty real ControlStyleProperties::bottomPadding

The \l [QtQuickControls]{Control Layout}{bottom padding} of the control. If not set, falls back to \l padding.

See also
padding, topPadding, leftPadding, rightPadding

\qmlproperty HandleStyle ControlStyleProperties::handle

Grouped property for styling the handle of a control.

The handle is used by controls such as \l [QtQuickControls]{Switch}, \l [QtQuickControls]{Slider}, and \l [QtQuickControls]{RangeSlider}. For a RangeSlider, the two handles can be styled individually through \l {HandleStyle.first}{handle.first} and \l {HandleStyle.second}{handle.second}.

See also
HandleStyle, DelegateStyle

\qmlproperty IndicatorStyle ControlStyleProperties::indicator

Grouped property for styling the indicator of a control. For a \l {StylableControls::}{checkBox}, the indicator is the frame, and its \l {IndicatorStyle::}{foreground} is the check mark. For a \l {StylableControls::}{slider}, the indicator is the groove, and the foreground is the fill.

See also
DelegateStyle

\qmlproperty real ControlStyleProperties::leftPadding

The \l [QtQuickControls]{Control Layout}{left padding} of the control. If not set, falls back to \l padding.

See also
padding, rightPadding, topPadding, bottomPadding

\qmlproperty real ControlStyleProperties::padding

The uniform spacing between the \l [QtQuickControls]{Control Layout}{control's content area and the bounds of the control}. Setting this provides a default value for \l leftPadding, \l rightPadding, \l topPadding, and \l bottomPadding. Each side can be overridden individually.

See also
leftPadding, rightPadding, topPadding, bottomPadding

\qmlproperty real ControlStyleProperties::rightPadding

The \l [QtQuickControls]{Control Layout}{right padding} of the control. If not set, falls back to \l padding.

See also
padding, leftPadding, topPadding, bottomPadding

\qmlproperty real ControlStyleProperties::spacing

The spacing between visual elements inside the control, for example between an indicator and a label.

\qmlproperty TextStyle ControlStyleProperties::text

Grouped property for styling the text label of a control.

\qmlproperty real ControlStyleProperties::topPadding

The \l [QtQuickControls]{Control Layout}{top padding} of the control. If not set, falls back to \l padding.

See also
padding, bottomPadding, leftPadding, rightPadding

\qmlproperty Transition ControlStyleProperties::transition

A \l [QtQuick]{Transition} used to animate style properties when the control enters a new state, such as \l {ControlStateStyle::}{hovered} or \l {ControlStateStyle::}{pressed}. If set to null (the default), property changes are applied immediately without animation.

To avoid repeating the same target properties for each delegate, StyleKit provides \l StyleAnimation for convenience, which can be used instead of, or in combination with, the \l {Animation and Transitions in Qt Quick}{standard animations:}

Note
For color properties that participate in a transition, prefer \l {Qt.alpha} over "transparent" (e.g. {menuBarItem.background.color: Qt.alpha(palette.accent, 0)}). "transparent" is {Qt.rgba(0, 0, 0, 0)}, which can pull interpolated colors toward black during the transition.

\qmltype DelegateStyle \inqmlmodule Qt.labs.StyleKit

Defines the visual appearance of an element within a control.

DelegateStyle describes the visual appearance of a visual element within a \l ControlStyle, such as its \l {ControlStyleProperties::}{background}, \l {ControlStyleProperties::}{indicator}, or a sub-element like \l {IndicatorStyle::foreground}{indicator.foreground}. It provides properties for controlling \l {DelegateStyle::width}{size}, \l {DelegateStyle::}{color}, \l {DelegateStyle::}{border}, \l {DelegateStyle::}{radius}, \l {DelegateStyle::}{shadow}, \l {DelegateStyle::}{image}, \l {DelegateStyle::}{opacity}, and more.

\labs

See also
ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty Qt::Alignment DelegateStyle::alignment

The alignment of the delegate within its parent. The default value is {Qt.AlignLeft | Qt.AlignVCenter}.

\qmlproperty BorderStyle DelegateStyle::border

Grouped property for styling the border of this delegate.

\qmlproperty real DelegateStyle::bottomLeftRadius

The bottom-left corner radius. If not set, falls back to \l radius.

See also
radius, topLeftRadius, topRightRadius, bottomRightRadius

\qmlproperty real DelegateStyle::bottomMargin

The bottom margin of this delegate. If not set, falls back to \l margins.

See also
margins, topMargin, leftMargin, rightMargin

\qmlproperty real DelegateStyle::bottomRightRadius

The bottom-right corner radius. If not set, falls back to \l radius.

See also
radius, topLeftRadius, topRightRadius, bottomLeftRadius

\qmlproperty bool DelegateStyle::clip

Whether the delegate clips its contents. The default value is false.

\qmlproperty color DelegateStyle::color

The fill color of this delegate. The default value is transparent.

Unlike a Quick \l [QtQuick]{Rectangle}, where a gradient replaces the color, StyleKit draws the \l gradient on top of the color. This means you can use a semi-transparent gradient as an overlay (for example, a subtle shading effect) while the color shows through underneath.

See also
gradient, opacity

\qmlproperty QObject DelegateStyle::data

An arbitrary object that can be used for passing custom data from the style to a custom \l delegate component.

This allows you to define custom style properties beyond what the StyleKit API provides. The data object can vary between states and themes, making it possible to style elements in a custom \l delegate that are not covered by the built-in properties.

The following snippet uses a custom delegate that draws an overlay \l Text whose color varies depending on the control's state. The delegate inherits \l StyledItem, which is optional but ensures the rest of the button background is rendered normally.

Note
The data object is propagated as a whole. Unlike regular style properties, individual properties inside the data object do not propagate separately.
See also
delegate

\qmlproperty Component DelegateStyle::delegate

The delegate used to render the DelegateStyle in a \l {Qt Quick Controls}{Qt Quick Control}.

The default value is null, in which case \l StyledItem is used for rendering instead. If you want to hide the delegate altogether (and prevent if from being created), set \l visible to false.

The delegate needs to define the following required properties: \qml required property DelegateStyle delegateStyle required property QtObject control \endqml

delegateStyle points to the DelegateStyle that describes how the delegate should be styled. control points to the \l {Qt Quick Controls}{Qt Quick Control} that owns the delegate. The latter can be used to resolve additional information about the control not available from the style.

If you know the specific type of the owning control, you can use it instead of \l QtObject for the control property. For example, since a handle delegate in the snippet below is always used inside a Slider, the type can be set to \l {Qt Quick Templates 2 QML Types}{T.Slider}:

Note
If a DelegateStyle has a \l {shadow}{drop shadow} defined, it will be drawn separately by a \l {ShadowStyle::delegate}{shadow delegate.}
See also
data, visible, StyledItem

\qmlproperty Gradient DelegateStyle::gradient

The gradient of this delegate. The default value is null (no gradient).

Unlike a Quick \l [QtQuick]{Rectangle}, where a gradient replaces the color, StyleKit draws the \l gradient on top of the color. This means you can use a semi-transparent gradient as an overlay (for example, a subtle shading effect) while the color shows through underneath.

See also
color

\qmlproperty ImageStyle DelegateStyle::image

Grouped property for placing an image inside this delegate.

See also
ImageStyle

\qmlproperty real DelegateStyle::width

The width of this delegate.

Note
This property will only set the delegate width when \l fillWidth is false. This also applies when \l fillWidth is set higher up in the style hierarchy, for example in the \l {Style::fallbackStyle}{fallback style}.

If this delegate is at the root of the control — for example the \l {ControlStyleProperties::background}{background} or the \l {ControlStyleProperties::indicator}{indicator} — it will also be included when calculating the \l [QtQuick]{Item::implicitWidth}{implicit width} of the control, even when \l fillWidth is true.

See also
height, fillWidth, minimumWidth, {StyleKit Property Resolution}

\qmlproperty real DelegateStyle::height

The height of this delegate.

Note
This property will only set the delegate height when \l fillHeight is false. This also applies when \l fillHeight is set higher up in the style hierarchy, for example in the \l {Style::fallbackStyle}{fallback style}.

If this delegate is at the root of the control — for example the \l {ControlStyleProperties::background}{background} or the \l {ControlStyleProperties::indicator}{indicator} — it will also be included when calculating the \l [QtQuick]{Item::implicitHeight}{implicit height} of the control, even when \l fillHeight is true.

See also
width, fillHeight, minimumHeight, {StyleKit Property Resolution}

\qmlproperty real DelegateStyle::leftMargin

The left margin of this delegate. If not set, falls back to \l margins.

See also
margins, rightMargin, topMargin, bottomMargin

\qmlproperty real DelegateStyle::margins

The uniform margin around this delegate. Setting this provides a default value for \l leftMargin, \l rightMargin, \l topMargin, and \l bottomMargin. Each side can be overridden individually.

See also
leftMargin, rightMargin, topMargin, bottomMargin

\qmlproperty real DelegateStyle::minimumWidth

The minimum width of this delegate. The delegate will not be sized smaller than this value.

\qmlproperty real DelegateStyle::minimumHeight

The minimum height of this delegate. The delegate will not be sized smaller than this value.

\qmlproperty bool DelegateStyle::fillWidth

Whether the delegate should fill the available width of the parent item.

Some delegates, such as the groove of a \l [QtQuickControls]{Slider}, are often expected to fill the available width of the control, rather than having a fixed implicit width. This can be achieved by setting fillWidth to true. To add some space between the delegate and the edges of its parent, use the \l margins properties.

If fillWidth is false, the delegate's width is determined by its \l width.

See also
fillHeight, width

\qmlproperty bool DelegateStyle::fillHeight

Whether the delegate should fill the available height of the parent item.

Some delegates, such as the foreground of a checkbox indicator, are often expected to fill the available height (and width) of the indicator, rather than having a fixed height. This can be achieved by setting fillHeight to true. To add some space between the delegate and the edges of its parent, use the \l margins properties.

If fillHeight is false, the delegate's height is determined by its \l height.

See also
fillWidth, height

\qmlproperty real DelegateStyle::opacity

The opacity of this delegate, from 0.0 (fully transparent) to 1.0 (fully opaque). The default value is 1.0.

See also
visible, color

\qmlproperty real DelegateStyle::radius

The corner radius applied to all four corners of this delegate. Individual corners can be overridden with \l topLeftRadius, \l topRightRadius, \l bottomLeftRadius, and \l bottomRightRadius.

See also
topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius

\qmlproperty real DelegateStyle::rightMargin

The right margin of this delegate. If not set, falls back to \l margins.

See also
margins, leftMargin, topMargin, bottomMargin

\qmlproperty real DelegateStyle::rotation

The rotation of this delegate, in degrees.

\qmlproperty real DelegateStyle::scale

The scale factor of this delegate. The default value is 1.0.

\qmlproperty ShadowStyle DelegateStyle::shadow

Grouped property for styling a drop shadow behind this delegate.

See also
ShadowStyle

\qmlproperty real DelegateStyle::topLeftRadius

The top-left corner radius. If not set, falls back to \l radius.

See also
radius, topRightRadius, bottomLeftRadius, bottomRightRadius

\qmlproperty real DelegateStyle::topMargin

The top margin of this delegate. If not set, falls back to \l margins.

See also
margins, bottomMargin, leftMargin, rightMargin

\qmlproperty real DelegateStyle::topRightRadius

The top-right corner radius. If not set, falls back to \l radius.

See also
radius, topLeftRadius, bottomLeftRadius, bottomRightRadius

\qmlproperty bool DelegateStyle::visible

Whether this delegate is visible. The default value is true.

Note
Although the default value is true, the \l {Style::fallbackStyle}{fallback style} (which overrides many of the default values) sets {background.visible} to false for controls that typically should not draw a background, such as \l [QtQuickControls]{CheckBox}, \l [QtQuickControls]{RadioButton}, and \l [QtQuickControls]{Slider}.

When visible is false, the \l delegate will not be created. If you need a hidden delegate to be created, consider setting \l opacity to 0 instead.

See also
opacity

\qmltype ImageStyle \inqmlmodule Qt.labs.StyleKit

Defines the image style for a delegate.

ImageStyle provides properties for placing an image inside a \l DelegateStyle. It is available as the \l {DelegateStyle::image}{image} grouped property on any delegate.

\labs

See also
DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty color ImageStyle::color

A color overlay applied to the image. This is typically used to tint monochrome icons to match the style's color scheme.

\qmlproperty enumeration ImageStyle::fillMode

How the image should be scaled or tiled within the delegate. The value is one of the \l [QtQuick]{Image::fillMode}{Image.fillMode} enum values.

\qmlproperty url ImageStyle::source

The URL of the image to display inside the delegate.

\qmltype BorderStyle \inqmlmodule Qt.labs.StyleKit

Defines the border style for a delegate.

BorderStyle provides properties for the border drawn around a \l DelegateStyle. It is available as the \l {DelegateStyle::border}{border} grouped property on any delegate.

\labs

See also
DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty color BorderStyle::color

The color of the border. The default value is transparent.

\qmlproperty real BorderStyle::width

The width of the border in pixels.

\qmltype ShadowStyle \inqmlmodule Qt.labs.StyleKit

Defines the drop shadow style for a delegate.

ShadowStyle provides properties for rendering a drop shadow behind a \l DelegateStyle. It is available as the \l {DelegateStyle::shadow}{shadow} grouped property on any delegate.

By adjusting scale and color, shadows can also be used to create glow effects. The following snippet adds a diffuse white glow to the handle of a \l [QtQuickControls]{Switch} that intensifies when checked:

\labs

See also
DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty real ShadowStyle::blur

The blur of the shadow. A value of 0.0 produces a sharp shadow, while larger values produce a softer, more diffuse shadow. The default value is 10.0.

\qmlproperty color ShadowStyle::color

The color of the shadow. The default value is transparent, which means that no shadow will be drawn by default.

See also
visible, opacity

\qmlproperty Component ShadowStyle::delegate

A custom QML \l [QML]{Component} that replaces the default shadow rendering. When set, StyleKit instantiates this component instead of drawing the default shadow.

\qmlproperty real ShadowStyle::horizontalOffset

The horizontal offset of the shadow from the delegate, in pixels.

\qmlproperty real ShadowStyle::opacity

The opacity of the shadow, from 0.0 (fully transparent) to 1.0 (fully opaque). The default value is 1.0.

See also
visible, color

\qmlproperty real ShadowStyle::scale

The scale factor of the shadow relative to the delegate. The default value is 1.0.

\qmlproperty real ShadowStyle::verticalOffset

The vertical offset of the shadow from the delegate, in pixels.

\qmlproperty bool ShadowStyle::visible

Whether the shadow is visible. The default value is true.

However, since the default shadow \l color is transparent, the shadow will not be visible unless a different color is set.

See also
opacity

\qmltype HandleStyle \inqmlmodule Qt.labs.StyleKit \inherits DelegateStyle

Defines the handle style for controls such as \l [QtQuickControls]{Switch}, \l [QtQuickControls]{Slider} and \l [QtQuickControls]{RangeSlider}.

HandleStyle extends \l DelegateStyle with properties that are specific to styling a handle.

Some controls have more than one handle. For example, \l [QtQuickControls]{RangeSlider} has both a \l [QtQuickControls]{RangeSlider::}{first} and a \l [QtQuickControls]{RangeSlider::}{second} handle. These can be styled independently using the \l first and \l second sub-handles, {slider.handle.first} and {slider.handle.second}. Properties not set on a sub-handle fall back to the handle itself.

\labs

See also
DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty DelegateStyle HandleStyle::first

Grouped property for styling the first handle of for example a \l [QtQuickControls]{RangeSlider}. Unset properties fall back to the HandleStyle itself.

\qmlproperty DelegateStyle HandleStyle::second

Grouped property for styling the second handle of for example a \l [QtQuickControls]{RangeSlider}. Unset properties fall back to the HandleStyle itself.

\qmltype SubIndicatorStyle \inqmlmodule Qt.labs.StyleKit \inherits DelegateStyle

Defines the style for a sub-indicator delegate.

SubIndicatorStyle extends \l DelegateStyle with a \l foreground property. It is used for styling sub-indicator delegates such as \l {IndicatorStyle::first}{indicator.first} and \l {IndicatorStyle::second}{indicator.second} in controls with multiple indicators, like \l [QtQuickControls]{SpinBox}. For SpinBox, {indicator.first} styles the increment button, and {indicator.second} styles the decrement button. It is equivalent to \l IndicatorStyle, but does not itself contain sub-indicators.

\labs

See also
IndicatorStyle, DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty DelegateStyle SubIndicatorStyle::foreground

Grouped property for styling the foreground element of this indicator. The foreground typically represents a checkmark, icon or arrow rendered inside the indicator.

\qmltype IndicatorStyle \inqmlmodule Qt.labs.StyleKit \inherits DelegateStyle

Defines the style for a control's indicator.

IndicatorStyle extends \l DelegateStyle with properties that are specific to styling an indicator.

The IndicatorStyle itself describes the indicator background, while the \l foreground describes the content drawn inside it. For example, {checkBox.indicator} styles the check box frame and {checkBox.indicator.foreground} styles the check mark. For \l {StylableControls::}{switchControl}, \l {StylableControls::}{slider} and \l {StylableControls::}{progressBar}, the indicator styles the groove and the foreground styles the fill.

Some controls have more than one indicator. For example, \l [QtQuickControls]{SpinBox} has both an increment and a decrement button. These can be styled independently using the \l first and \l second sub-indicators, {spinBox.indicator.first} and {spinBox.indicator.second}. For SpinBox, {indicator.first} styles the increment button, and {indicator.second} styles the decrement button. Properties not set on a sub-indicator fall back to the indicator itself.

Note
The up and down properties are kept as aliases for first and second for backward compatibility. New code should use first and second, as these names are generic and can be used by controls with sub-indicators that do not represent up/down actions. The compatibility aliases may be removed in a future version.

\labs

See also
SubIndicatorStyle, DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty DelegateStyle IndicatorStyle::foreground

Grouped property for styling the foreground element of this indicator. For example, {checkBox.indicator} describes the check box frame, while {checkBox.indicator.foreground} is the check mark.

For controls like \l {StylableControls::}{slider}, \l {StylableControls::}{progressBar}, and \l {StylableControls::}{switchControl}, the {indicator.foreground} represents the progress track or fill within the groove, while the indicator itself represents the groove.

\qmlproperty SubIndicatorStyle IndicatorStyle::first

Grouped property for styling the first sub-indicator of controls that expose multiple indicators. For \l [QtQuickControls]{SpinBox}, this styles the increment button. Unset properties fall back to the indicator itself.

Note
The up property is kept as an alias for first for backward compatibility. New code should use first, as this name is generic and can be used by controls with sub-indicators that do not represent up actions. The compatibility alias may be removed in a future version.
See also
second

\qmlproperty SubIndicatorStyle IndicatorStyle::second

Grouped property for styling the second sub-indicator of for example a \l [QtQuickControls]{SpinBox}. Unset properties fall back to the indicator itself.

Note
The down property is kept as an alias for second for backward compatibility. New code should use second, as this name is generic and can be used by controls with sub-indicators that do not represent down actions. The compatibility alias may be removed in a future version.
See also
first

\qmltype TextStyle \inqmlmodule Qt.labs.StyleKit

Defines the text style for a control's label.

TextStyle provides properties for controlling the appearance of text labels within a control, such as \l color, \l alignment and \l padding, and certain font-related properties such as \l {TextStyle::}{bold}, \l {TextStyle::}{italic}, and \l {TextStyle::pointSize}{font size}.

It is available as the \l {ControlStyleProperties::text}{text} grouped property on every \l ControlStateStyle.

\labs

See also
DelegateStyle, ControlStyle, ControlStateStyle, {qtlabsstylekit-fallbackstyle.html}{FallbackStyle Reference}

\qmlproperty Qt::Alignment TextStyle::alignment

The alignment of the text within its available area.

\qmlproperty bool TextStyle::bold

Whether the text should be rendered in bold. The default value is false.

See also
italic

\qmlproperty real TextStyle::bottomPadding

The bottom padding around the text. If not set, falls back to \l padding.

See also
padding, topPadding, leftPadding, rightPadding

\qmlproperty color TextStyle::color

The color of the text.

\qmlproperty bool TextStyle::italic

Whether the text should be rendered in italic. The default value is false.

See also
bold

\qmlproperty real TextStyle::leftPadding

The left padding around the text. If not set, falls back to \l padding.

See also
padding, rightPadding, topPadding, bottomPadding

\qmlproperty real TextStyle::padding

The uniform padding around the text. Setting this provides a default value for \l leftPadding, \l rightPadding, \l topPadding, and \l bottomPadding. Each side can be overridden individually.

See also
leftPadding, rightPadding, topPadding, bottomPadding

\qmlproperty real TextStyle::pointSize

The point size of the text font.

\qmlproperty real TextStyle::rightPadding

The right padding around the text. If not set, falls back to \l padding.

See also
padding, leftPadding, topPadding, bottomPadding

\qmlproperty real TextStyle::topPadding

The top padding around the text. If not set, falls back to \l padding.

See also
padding, bottomPadding, leftPadding, rightPadding

\qmlproperty TextStyle TextStyle::first

Grouped property for styling the first text element in controls that expose two separate text labels. Unset properties fall back to \l {ControlStyleProperties::text}{text} itself.

See also
second

\qmlproperty TextStyle TextStyle::second

Grouped property for styling the second text element in controls that expose two separate text labels. Unset properties fall back to \l {ControlStyleProperties::text}{text} itself.

See also
first

Definition at line 965 of file qqstylekitcontrolproperties.cpp.

References QObjectData::parent.

Member Function Documentation

◆ controlProperties()

QQStyleKitControlProperties * QQStyleKitPropertyGroup::controlProperties ( ) const

Definition at line 970 of file qqstylekitcontrolproperties.cpp.

References isControlProperties().

Referenced by QQStyleKitTextProperties::emitGlobally(), handleStylePropertiesChanged(), QQStyleKitPropertyResolver::hasLocalStyleProperty(), QQStyleKitPropertyResolver::readStyleProperty(), and QQStyleKitPropertyResolver::writeStyleProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emitChangedForAllStylePropertiesRecursive()

void QQStyleKitPropertyGroup::emitChangedForAllStylePropertiesRecursive ( EmitFlags emitFlags)

Definition at line 1098 of file qqstylekitcontrolproperties.cpp.

◆ forEachExistingNestedGroup()

void QQStyleKitPropertyGroup::forEachExistingNestedGroup ( const std::function< void(QQStyleKitPropertyGroup *)> & f) const
protectedvirtual

◆ groupSpace()

QQStyleKitPropertyGroupSpace QQStyleKitPropertyGroup::groupSpace ( ) const
inline

Definition at line 101 of file qqstylekitcontrolproperties_p.h.

Referenced by QQStyleKitPropertyPath::QQStyleKitPropertyPath().

Here is the caller graph for this function:

◆ handleStylePropertiesChanged()

template<typename SUBCLASS, typename... CHANGED_SIGNALS>
void QQStyleKitPropertyGroup::handleStylePropertiesChanged ( CHANGED_SIGNALS... changedSignals)
inline

Definition at line 1048 of file qqstylekitcontrolproperties.cpp.

References controlProperties().

Here is the call graph for this function:

◆ handleStylePropertyChanged()

template<typename SUBCLASS>
void QQStyleKitPropertyGroup::handleStylePropertyChanged ( void(SUBCLASS::* changedSignal )())
inline

Definition at line 1043 of file qqstylekitcontrolproperties.cpp.

◆ isControlProperties()

bool QQStyleKitPropertyGroup::isControlProperties ( ) const
inline

Definition at line 91 of file qqstylekitcontrolproperties_p.h.

Referenced by controlProperties().

Here is the caller graph for this function:

◆ isDefined()

bool QQStyleKitPropertyGroup::isDefined ( QQSK::Property property) const
inline

Definition at line 77 of file qqstylekitcontrolproperties_p.h.

◆ lazyCreateGroup()

template<typename T>
T * QQStyleKitPropertyGroup::lazyCreateGroup ( T *const & ptr,
QQSK::PropertyGroup group ) const

Definition at line 982 of file qqstylekitcontrolproperties.cpp.

◆ pathFlags()

QQSK::PropertyPathFlags QQStyleKitPropertyGroup::pathFlags ( ) const
inline

Definition at line 100 of file qqstylekitcontrolproperties_p.h.

◆ setStyleProperty()

template<typename T>
bool QQStyleKitPropertyGroup::setStyleProperty ( QQSK::Property property,
T value )
inline

Definition at line 71 of file qqstylekitcontrolproperties_p.h.

◆ styleProperty() [1/2]

template<typename T>
T QQStyleKitPropertyGroup::styleProperty ( QQSK::Property property,
const T & defaultValue ) const
inline

Definition at line 64 of file qqstylekitcontrolproperties_p.h.

◆ styleProperty() [2/2]

template<typename T>
T QQStyleKitPropertyGroup::styleProperty ( QQSK::Property property,
QQSK::Property alternative = QQSK::Property::NoProperty ) const
inline

Definition at line 56 of file qqstylekitcontrolproperties_p.h.

Member Data Documentation

◆ m_groupSpace

QQStyleKitPropertyGroupSpace QQStyleKitPropertyGroup::m_groupSpace
protected

Definition at line 108 of file qqstylekitcontrolproperties_p.h.

◆ m_pathFlags

QQSK::PropertyPathFlags QQStyleKitPropertyGroup::m_pathFlags = QQSK::PropertyPathFlag::NoFlags
protected

Definition at line 109 of file qqstylekitcontrolproperties_p.h.


The documentation for this class was generated from the following files: