Badge

Search for usage in LXR

Badge Class Reference
Inheritance diagram for Badge:

Properties

color color
 
alias icon
 
int size
 
alias text
 

Detailed Description

A Badge item to display text - as a counter - or an icon as a notification hint.

Since
org.mauikit.controls 1.0

This controls inherits from QQC2 Control, to checkout its inherited properties refer to the Qt Docs.

Badges with different sizes and colors
{
text: "Example1"
Maui.Badge
{
icon.name: "actor"
color: Maui.Theme.neutralBackgroundColor
anchors.horizontalCenter: parent.right
anchors.verticalCenter: parent.top
}
}
color color
The color for the background of the badge.
Definition Badge.qml:72
alias icon
The icon group property.
Definition Badge.qml:63
alias text
The text to be used in the label.
Definition Badge.qml:68

You can find a more complete example at this link.

Definition at line 49 of file Badge.qml.

Property Documentation

◆ color

color Badge::color
read

The color for the background of the badge.

Definition at line 72 of file Badge.qml.

◆ icon

alias Badge::icon
read

The icon group property.

Exposed to define the icon name, color, and width and height. To know more about it you can check the QQC2 icon property.

Definition at line 63 of file Badge.qml.

◆ size

int Badge::size
read

Size of the badge.

Used as width and height, unless the implicitWidth is wider. It is also used as the icon size doimentions. By default is set to Style.iconSizes.small

Definition at line 58 of file Badge.qml.

◆ text

alias Badge::text
read

The text to be used in the label.

Consider using short text, as this is meant to work as a notification hint.

Definition at line 68 of file Badge.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.