Scroll to navigation

kdk::KTag(3) Library Functions Manual kdk::KTag(3)

NAME

kdk::KTag - 提供四种样式的标签,响应系统主题色变化

SYNOPSIS

#include <ktag.h>

Inherits QPushButton.

Public Member Functions


KTag (QWidget *parent=nullptr)
void setClosable (bool)
设置关闭按钮是否可见 bool closable ()
返回关闭按钮是否可见 void setText (const QString &)
设置文本 QString text ()
获取当前文本 void setTagStyle (TagStyle)
设置tag样式 TagStyle tagStyle ()
获取当前tag样式 void setBackgroundColor (QColor color)
设置背景颜色 void setTranslucent (bool flag)
设置半透明 bool translucent ()
获取是否启用半透明

Protected Member Functions


void paintEvent (QPaintEvent *event)
QSize sizeHint () const override

Detailed Description

提供四种样式的标签,响应系统主题色变化

Since

1.0.0

Member Function Documentation

bool kdk::KTag::closable ()

返回关闭按钮是否可见

Returns

bool

void kdk::KTag::setBackgroundColor (QColor color)

设置背景颜色

Parameters

flag

Since

2.4.1.0

void kdk::KTag::setTranslucent (bool flag)

设置半透明

Parameters

flag

Since

2.4.1.0

TagStyle kdk::KTag::tagStyle ()

获取当前tag样式

Returns

TagStyle

QString kdk::KTag::text ()

获取当前文本

Returns

QString

bool kdk::KTag::translucent ()

获取是否启用半透明

Returns

bool

Since

2.4.1.0

Author

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.

Version version:3.0 LIBKYSDK-APPLICATIONS