- class QKeySequenceEdit#
The
QKeySequenceEdit
widget allows to input a QKeySequence. More…Synopsis#
Properties#
clearButtonEnabledᅟ
- Whether the key sequence edit displays a clear button when it is not emptyfinishingKeyCombinationsᅟ
- List of key combinations that finish editing the key sequenceskeySequenceᅟ
- This property contains the currently chosen key sequencemaximumSequenceLengthᅟ
- Maximum sequence length
Methods#
Slots#
def
clear()
def
setKeySequence()
Signals#
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property clearButtonEnabledᅟ: bool#
This property holds Whether the key sequence edit displays a clear button when it is not empty..
If enabled, the key sequence edit displays a trailing clear button when it contains some text, otherwise the line edit does not show a clear button (the default).
- Access functions:
- property finishingKeyCombinationsᅟ: list of QKeyCombination#
This property holds The list of key combinations that finish editing the key sequences..
Any combination in the list will finish the editing of key sequences. All other key combinations can be recorded as part of a key sequence. By default, Qt::Key_Tab and Qt::Key_Backtab will finish recording the key sequence.
- Access functions:
- property keySequenceᅟ: QKeySequence#
This property holds This property contains the currently chosen key sequence..
The shortcut can be changed by the user or via setter function.
Note
If the QKeySequence is longer than the
maximumSequenceLength
property, the key sequence is truncated.- Access functions:
- property maximumSequenceLengthᅟ: int#
This property holds The maximum sequence length..
The maximum number of key sequences a user can enter. The value needs to be between 1 and 4, with 4 being the default.
- Access functions:
Constructs a
QKeySequenceEdit
widget with the givenparent
.- __init__(keySequence[, parent=None])
- Parameters:
keySequence –
QKeySequence
parent –
QWidget
Constructs a
QKeySequenceEdit
widget with the givenkeySequence
andparent
.- clear()#
Clears the current key sequence.
- 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.
- finishingKeyCombinations()#
- Return type:
.list of QKeyCombination
See also
Getter of property
finishingKeyCombinationsᅟ
.- isClearButtonEnabled()#
- Return type:
bool
Getter of property
clearButtonEnabledᅟ
.- keySequence()#
- Return type:
See also
Getter of property
keySequenceᅟ
.- keySequenceChanged(keySequence)#
- Parameters:
keySequence –
QKeySequence
Notification signal of property
keySequenceᅟ
.- maximumSequenceLength()#
- Return type:
int
See also
Getter of property
maximumSequenceLengthᅟ
.- setClearButtonEnabled(enable)#
- Parameters:
enable – bool
See also
Setter of property
clearButtonEnabledᅟ
.- setFinishingKeyCombinations(finishingKeyCombinations)#
- Parameters:
finishingKeyCombinations – .list of QKeyCombination
See also
Setter of property
finishingKeyCombinationsᅟ
.- setKeySequence(keySequence)#
- Parameters:
keySequence –
QKeySequence
See also
Setter of property
keySequenceᅟ
.- setMaximumSequenceLength(count)#
- Parameters:
count – int
See also
Setter of property
maximumSequenceLengthᅟ
.