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

kdk::KLabel - 继承qlabel

#include <klabel.h>

Inherits QLabel.


void enterWidget ()
鼠标进入信号 void leaveWidget ()
鼠标离开信号 void clicked (bool clicked)
鼠标点击信号 void doubleClicked ()
鼠标双击信号


KLabel (QWidget *parent=nullptr)
void setLabelType (KLabelType type=KLabelType::DataType)
设置label类型,NormalType和IconAndTextType void setDataHightColor (bool flag)
设置是否启用文本/图标高亮色 void setPixmap (const QPixmap &pixmap)
设置图标pixmap void setPixmap (QIcon icon, int width, int height)
设置图标icon const QPixmap * pixmap () const
获取图标 void setText (const QString &str)
设置文本 QString text ()
获取文本 void setBackgroundColor (bool flag, QColor color=Qt::white)
设置背景颜色 void setHighlightBackground (bool flag)
设置是否启用背景高亮色 void setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)
设置圆角 void setBorderRadius (int radius)
设置圆角 void setWordWrap (bool flag)
设置是否启用换行 bool wordWrap ()
获取是否启用换行 void setFontColor (QColor color)
设置字体颜色 void setFontColorRole (QPalette::ColorRole role)
设置字体颜色colorRole void setTristate (bool flag)
设置三态是否开启 bool isTristate ()
获取三态是否开启


void paintEvent (QPaintEvent *event)
QSize sizeHint () const
void resizeEvent (QResizeEvent *event)
virtual void enterEvent (QEvent *event)
virtual void leaveEvent (QEvent *event)
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void mouseDoubleClickEvent (QMouseEvent *event)

继承qlabel

Since

2.4.1.0

鼠标点击信号

Parameters

clicked

Since

3.0.1.0

鼠标双击信号

Since

3.0.1.0

鼠标进入信号

Since

3.0.1.0

获取三态是否开启

Returns

Since

3.0.1.0

鼠标离开信号

Since

3.0.1.0

获取图标

Returns

设置背景颜色

Parameters

flag

设置圆角

Parameters

bottomLeft
topLeft
topRight
bottomRight

设置圆角

Parameters

radius

设置是否启用文本/图标高亮色

Parameters

flag

设置字体颜色

Parameters

color

Since

2.5.2.0

设置字体颜色colorRole

Parameters

role

Since

3.0.1.0

设置是否启用背景高亮色

Since

2.5.2.0

Parameters

flag

设置label类型,NormalType和IconAndTextType

Parameters

type

设置图标pixmap

Parameters

pixmap

设置图标icon

Parameters

icon

Since

2.5.2.0-0k0.3

设置文本

Since

2.5.2.0

Parameters

str

设置三态是否开启

Parameters

flag

Since

3.0.1.0

设置是否启用换行

Since

2.5.2.0

Parameters

flag

获取文本

Since

2.5.2.0

Returns

获取是否启用换行

Since

2.5.2.0

Returns

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

Version version:3.0 LIBKYSDK-APPLICATIONS