QKeySequenceEdit Class

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

头文件: #include <QKeySequenceEdit>
qmake: QT += widgets
开始支持版本: 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)
  • 19 个公有槽函数继承自 QWidget
  • 1 个公有槽函数继承自 QObject

信号

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)
  • 35 个受保护的函数继承自 QWidget
  • 9 个受保护的函数继承自 QObject
  • 1 个受保护的函数继承自 QPaintDevice

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 5 个静态公有成员继承自 QWidget
  • 10 个静态公有成员继承自 QObject
  • 35 个受保护的函数继承自 QWidget
  • 9 个受保护的函数继承自 QObject
  • 1 个受保护的函数继承自 QPaintDevice
  • 1 个受保护的槽函数继承自 QWidget
  • 2 个受保护的变量继承自 QObject
  • 1 protected type inherited from QPaintDevice

详细描述

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)

Notifier signal:

void keySequenceChanged(const QKeySequence &keySequence)

成员函数

QKeySequenceEdit::QKeySequenceEdit(QWidget *parent = Q_NULLPTR)

Constructs a QKeySequenceEdit widget with the given parent.

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

Constructs a QKeySequenceEdit widget with the given keySequence and parent.

QKeySequenceEdit::~QKeySequenceEdit()

Destroys the QKeySequenceEdit object.

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