Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcommandlinkbutton.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QCOMMANDLINKBUTTON_H
6#define QCOMMANDLINKBUTTON_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtWidgets/qpushbutton.h>
10
12
13QT_BEGIN_NAMESPACE
14
15
16class QCommandLinkButtonPrivate;
17
18class Q_WIDGETS_EXPORT QCommandLinkButton: public QPushButton
19{
20 Q_OBJECT
21
22 Q_PROPERTY(QString description READ description WRITE setDescription)
23 Q_PROPERTY(bool flat READ isFlat WRITE setFlat DESIGNABLE false)
24
25public:
26 explicit QCommandLinkButton(QWidget *parent = nullptr);
27 explicit QCommandLinkButton(const QString &text, QWidget *parent = nullptr);
28 explicit QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = nullptr);
29 ~QCommandLinkButton();
30
31 QString description() const;
32 void setDescription(const QString &description);
33
34 QSize sizeHint() const override;
35 int heightForWidth(int) const override;
36 QSize minimumSizeHint() const override;
37 void initStyleOption(QStyleOptionButton *option) const override;
38
39protected:
40 bool event(QEvent *e) override;
41 void paintEvent(QPaintEvent *) override;
42
43private:
44 Q_DISABLE_COPY(QCommandLinkButton)
45 Q_DECLARE_PRIVATE(QCommandLinkButton)
46};
47
48QT_END_NAMESPACE
49
50#endif // QCOMMANDLINKBUTTON
int descriptionHeight(int width) const
QColor mergedColors(const QColor &a, const QColor &b, int value) const
The QCommandLinkButton widget provides a Vista style command link button.
\variable QStyleOptionHeaderV2::textElideMode
\reentrant
Definition qtextlayout.h:70
QT_REQUIRE_CONFIG(commandlinkbutton)