Badge

Search for usage in LXR

Inheritance diagram for Badge:

Properties

color color
 
int size
 

Public Member Functions

void setBackgroundColor (control)
 
void setTextColor (control)
 

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:63

You can find a more complete example at this link.

Definition at line 50 of file Badge.qml.

Property Documentation

◆ color

color Badge::color
read

The color for the background of the badge.

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 59 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 Sep 6 2024 12:09:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.