Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
buttonwidget.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#ifndef BUTTONWIDGET_H
5
#define BUTTONWIDGET_H
6
7
#include <QWidget>
8
9
class
QSignalMapper
;
10
class
QString
;
11
13
class
ButtonWidget
:
public
QWidget
14
{
15
Q_OBJECT
16
17
public
:
18
ButtonWidget
(
const
QStringList
&texts,
QWidget
*
parent
=
nullptr
);
19
20
signals
:
21
void
clicked
(
const
QString
&
text
);
22
23
private
:
24
QSignalMapper
*signalMapper;
26
};
28
29
#endif
ButtonWidget
[0]
Definition
buttonwidget.h:14
ButtonWidget::clicked
void clicked(const QString &text)
QObject::parent
QObject * parent() const
Returns a pointer to the parent object.
Definition
qobject.h:311
QSignalMapper
\inmodule QtCore
Definition
qsignalmapper.h:14
QStringList
\inmodule QtCore
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QWidget
The QWidget class is the base class of all user interface objects.
Definition
qwidget.h:99
text
QString text
Definition
doc_src_properties.cpp:102
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
signals
#define signals
Definition
qtmetamacros.h:41
qtbase
src
corelib
doc
snippets
qsignalmapper
buttonwidget.h
Generated by
1.9.7