DtkWidget
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 paintEvent(QPaintEvent *event) override
DLabel::paintEvent
Definition dlabel.cpp:141
void setForegroundRole(QPalette::ColorRole role)
显示的字体颜色
Definition dlabel.cpp:62
void initPainter(QPainter *painter) const override
初始化 painter
Definition dlabel.cpp:125
DTipLabel一个重新实现的 QLabel.
Definition dtiplabel.h:14