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 ().