DtkWidget 5.6.0.2
DTK Widget module
dtiplabel.h
1// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DTIPLABEL_H
6#define DTIPLABEL_H
7
8#include <DLabel>
9
10DWIDGET_BEGIN_NAMESPACE
11
12class DTipLabelPrivate;
13class LIBDTKWIDGETSHARED_EXPORT DTipLabel : public DLabel
14{
15 Q_OBJECT
16 Q_DISABLE_COPY(DTipLabel)
17 D_DECLARE_PRIVATE(DTipLabel)
18public:
19 DTipLabel(const QString &text = QString(), QWidget *parent = nullptr);
20 ~DTipLabel();
21
22 using QLabel::show;
23 void show(const QPoint &pos);
24 void setForegroundRole(DPalette::ColorType color);
25
26protected:
27 void initPainter(QPainter *painter) const override;
28 void paintEvent(QPaintEvent *event) override;
29};
30DWIDGET_END_NAMESPACE
31
32#endif // DTIPLABEL_H
DLabel一个重新实现的 QLabel.
Definition: dlabel.h:18
void setForegroundRole(QPalette::ColorRole role)
DLabel::setForegroundRole 显示的字体颜色 role 字体颜色(QPalette::ColorRole)
Definition: dlabel.cpp:57
void initPainter(QPainter *painter) const override
DLabel::initPainter 初始化 painter painter painter 形参
Definition: dlabel.cpp:115
void paintEvent(QPaintEvent *event) override
DLabel::paintEvent event 消息事件
Definition: dlabel.cpp:130
DTipLabel一个重新实现的 QLabel.
Definition: dtiplabel.h:14