QKeySequenceEdit Class
The QKeySequenceEdit widget allows to input a QKeySequence. More...
Header: | #include <QKeySequenceEdit> |
qmake: | QT += widgets |
Since: | Qt 5.2 |
Inherits: | QWidget |
This class was introduced in Qt 5.2.
Properties
- keySequence : QKeySequence
Public Functions
QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent = nullptr) | |
QKeySequenceEdit(QWidget *parent = nullptr) | |
virtual | ~QKeySequenceEdit() |
QKeySequence | keySequence() const |
- 214 public functions inherited from QWidget
- 30 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice
Public Slots
void | clear() |
void | setKeySequence(const QKeySequence &keySequence) |
Signals
void | editingFinished() |
void | keySequenceChanged(const QKeySequence &keySequence) |
Reimplemented Protected Functions
virtual bool | event(QEvent *e) override |
virtual void | keyPressEvent(QKeyEvent *e) override |
virtual void | keyReleaseEvent(QKeyEvent *e) override |
virtual void | timerEvent(QTimerEvent *e) override |
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
Related Non-Members
typedef | QObjectList |
QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
T | qobject_cast(QObject *object) |
T | qobject_cast(const QObject *object) |
Macros
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
QWIDGETSIZE_MAX | |
Q_CLASSINFO(Name, Value) | |
Q_DISABLE_COPY(Class) | |
Q_DISABLE_COPY_MOVE(Class) | |
Q_DISABLE_MOVE(Class) | |
Q_EMIT | |
Q_ENUM(...) | |
Q_ENUM_NS(...) | |
Q_FLAG(...) | |
Q_FLAG_NS(...) | |
Q_GADGET | |
Q_INTERFACES(...) | |
Q_INVOKABLE | |
Q_NAMESPACE | |
Q_OBJECT | |
Q_PROPERTY(...) | |
Q_REVISION | |
Q_SET_OBJECT_NAME(Object) | |
Q_SIGNAL | |
Q_SIGNALS | |
Q_SLOT | |
Q_SLOTS |
Additional Inherited Members
- 5 static public members inherited from QWidget
- 9 static public members inherited from QObject
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget
Detailed Description
This widget lets the user choose a QKeySequence, which is usually used as a shortcut. The recording is initiated when the widget receives the focus and ends one second after the user releases the last key.
See also QKeySequenceEdit::keySequence.
Property Documentation
keySequence : QKeySequence
This property contains the currently chosen key sequence.
The shortcut can be changed by the user or via setter function.
Access functions:
QKeySequence | keySequence() const |
void | setKeySequence(const QKeySequence &keySequence) |
Notifier signal:
void | keySequenceChanged(const QKeySequence &keySequence) |
Member Function Documentation
QKeySequenceEdit::QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent = nullptr)
Constructs a QKeySequenceEdit widget with the given keySequence and parent.
QKeySequenceEdit::QKeySequenceEdit(QWidget *parent = nullptr)
Constructs a QKeySequenceEdit widget with the given parent.
[slot]
void QKeySequenceEdit::clear()
Clears the current key sequence.
[signal]
void QKeySequenceEdit::editingFinished()
This signal is emitted when the user finishes entering the shortcut.
Note: there is a one second delay before releasing the last key and emitting this signal.
[virtual]
QKeySequenceEdit::~QKeySequenceEdit()
Destroys the QKeySequenceEdit object.
[override virtual protected]
bool QKeySequenceEdit::event(QEvent *e)
Reimplements: QWidget::event(QEvent *event).
[override virtual protected]
void QKeySequenceEdit::keyPressEvent(QKeyEvent *e)
Reimplements: QWidget::keyPressEvent(QKeyEvent *event).
[override virtual protected]
void QKeySequenceEdit::keyReleaseEvent(QKeyEvent *e)
Reimplements: QWidget::keyReleaseEvent(QKeyEvent *event).
[override virtual protected]
void QKeySequenceEdit::timerEvent(QTimerEvent *e)
Reimplements: QObject::timerEvent(QTimerEvent *event).