QKeySequenceEdit 类

The QKeySequenceEdit widget allows to input a QKeySequence . 更多...

头: #include <QKeySequenceEdit>
qmake: QT += widgets
Since: Qt 5.2
继承: QWidget

特性

公共函数

QKeySequenceEdit (QWidget * parent = Q_NULLPTR)
QKeySequenceEdit (const QKeySequence & keySequence , QWidget * parent = Q_NULLPTR)
~QKeySequenceEdit ()
QKeySequence keySequence () const

公共槽

void clear ()
void setKeySequence (const QKeySequence & keySequence )

信号

void editingFinished ()
void keySequenceChanged (const QKeySequence & keySequence )

重实现保护函数

virtual bool event (QEvent * e )
virtual void keyPressEvent (QKeyEvent * e )
virtual void keyReleaseEvent (QKeyEvent * e )
virtual void timerEvent (QTimerEvent * e )

额外继承成员

详细描述

The QKeySequenceEdit widget allows to input a QKeySequence .

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.

另请参阅 QKeySequenceEdit::keySequence .

特性文档编制

keySequence : QKeySequence

This property contains the currently chosen key sequence.

The shortcut can be changed by the user or via setter function.

访问函数:

QKeySequence keySequence () const
void setKeySequence (const QKeySequence & keySequence )

通知程序信号:

void keySequenceChanged (const QKeySequence & keySequence )

成员函数文档编制

QKeySequenceEdit:: QKeySequenceEdit ( QWidget * parent = Q_NULLPTR)

构造 QKeySequenceEdit widget with the given parent .

QKeySequenceEdit:: QKeySequenceEdit (const QKeySequence & keySequence , QWidget * parent = Q_NULLPTR)

构造 QKeySequenceEdit widget with the given keySequence and parent .

QKeySequenceEdit:: ~QKeySequenceEdit ()

销毁 QKeySequenceEdit 对象。

[slot] void QKeySequenceEdit:: clear ()

Clears the current key sequence.

[signal] void QKeySequenceEdit:: editingFinished ()

This signal is emitted when the user finishes entering the shortcut.

注意: there is a one second delay before releasing the last key and emitting this signal.

[virtual protected] bool QKeySequenceEdit:: event ( QEvent * e )

重实现自 QObject::event ().

[virtual protected] void QKeySequenceEdit:: keyPressEvent ( QKeyEvent * e )

重实现自 QWidget::keyPressEvent ().

[virtual protected] void QKeySequenceEdit:: keyReleaseEvent ( QKeyEvent * e )

重实现自 QWidget::keyReleaseEvent ().

[virtual protected] void QKeySequenceEdit:: timerEvent ( QTimerEvent * e )

重实现自 QObject::timerEvent ().