DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dtoolbutton.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DTOOLBUTTON_H
6#define DTOOLBUTTON_H
7
8#include <QToolButton>
9#include <dtkwidget_global.h>
10
11DWIDGET_BEGIN_NAMESPACE
12
13class LIBDTKWIDGETSHARED_EXPORT DToolButton : public QToolButton
14{
15 Q_OBJECT
16public:
17 DToolButton(QWidget *parent = nullptr);
18 void setAlignment(Qt::Alignment flag);
19 Qt::Alignment alignment() const;
20
21protected:
22 void paintEvent(QPaintEvent *event) override;
23 void initStyleOption(QStyleOptionToolButton *option) const;
24 QSize sizeHint() const override;
25};
26
27DWIDGET_END_NAMESPACE
28
29#endif // DTOOLBUTTON_H
继承自QToolButton类,用于自定义工具按钮。
Definition dtoolbutton.h:14