Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QCOMMANDLINKBUTTON_H
5#define QCOMMANDLINKBUTTON_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qpushbutton.h>
9
10QT_REQUIRE_CONFIG(commandlinkbutton);
11
13
14
16
17class Q_WIDGETS_EXPORT QCommandLinkButton: public QPushButton
18{
20
21 Q_PROPERTY(QString description READ description WRITE setDescription)
22 Q_PROPERTY(bool flat READ isFlat WRITE setFlat DESIGNABLE false)
23
24public:
25 explicit QCommandLinkButton(QWidget *parent = nullptr);
26 explicit QCommandLinkButton(const QString &text, QWidget *parent = nullptr);
27 explicit QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = nullptr);
29
30 QString description() const;
31 void setDescription(const QString &description);
32
33 QSize sizeHint() const override;
34 int heightForWidth(int) const override;
35 QSize minimumSizeHint() const override;
36 void initStyleOption(QStyleOptionButton *option) const override;
37
38protected:
39 bool event(QEvent *e) override;
40 void paintEvent(QPaintEvent *) override;
41
43 Q_DISABLE_COPY(QCommandLinkButton)
44 Q_DECLARE_PRIVATE(QCommandLinkButton)
45};
46
48
49#endif // QCOMMANDLINKBUTTON
The QCommandLinkButton widget provides a Vista style command link button.
\inmodule QtCore
Definition qcoreevent.h:45
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\variable QStyleOptionHeaderV2::textElideMode
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QString text
Combined button and popup list for selecting options.
struct _cl_event * event
GLuint GLenum option
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define explicit