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
Functions#
def
finishingKeyCombinations
()def
isClearButtonEnabled
()def
keySequence
()def
maximumSequenceLength
()def
setClearButtonEnabled
(enable)def
setFinishingKeyCombinations
(finishingKeyCombinations)
Slots#
def
clear
()def
setKeySequence
(keySequence)def
setMaximumSequenceLength
(count)
Signals#
def
editingFinished
()def
keySequenceChanged
(keySequence)
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
- class PySide6.QtWidgets.QKeySequenceEdit([parent=None])#
PySide6.QtWidgets.QKeySequenceEdit(keySequence[, parent=None])
- Parameters:
keySequence –
PySide6.QtGui.QKeySequence
parent –
PySide6.QtWidgets.QWidget
Constructs a QKeySequenceEdit
widget with the given parent
.
Constructs a QKeySequenceEdit
widget with the given keySequence
and parent
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtWidgets.QKeySequenceEdit.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:
setClearButtonEnabled
(enable)
- property PᅟySide6.QtWidgets.QKeySequenceEdit.finishingKeyCombinations#
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, Key_Tab
and Key_Backtab
will finish recording the key sequence.
- Access functions:
setFinishingKeyCombinations
(finishingKeyCombinations)
- property PᅟySide6.QtWidgets.QKeySequenceEdit.keySequence: PySide6.QtGui.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:
keySequence
()setKeySequence
(keySequence)Signal
keySequenceChanged
(keySequence)
- property PᅟySide6.QtWidgets.QKeySequenceEdit.maximumSequenceLength: qsizetype#
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:
setMaximumSequenceLength
(count)
- PySide6.QtWidgets.QKeySequenceEdit.clear()#
Clears the current key sequence.
- PySide6.QtWidgets.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.
- PySide6.QtWidgets.QKeySequenceEdit.finishingKeyCombinations()#
- Return type:
See also
Getter of property finishingKeyCombinations
.
- PySide6.QtWidgets.QKeySequenceEdit.isClearButtonEnabled()#
- Return type:
bool
Getter of property clearButtonEnabled
.
- PySide6.QtWidgets.QKeySequenceEdit.keySequence()#
- Return type:
See also
Getter of property keySequence
.
- PySide6.QtWidgets.QKeySequenceEdit.keySequenceChanged(keySequence)#
- Parameters:
keySequence –
PySide6.QtGui.QKeySequence
Notification signal of property keySequence
.
- PySide6.QtWidgets.QKeySequenceEdit.maximumSequenceLength()#
- Return type:
qsizetype
See also
Getter of property maximumSequenceLength
.
- PySide6.QtWidgets.QKeySequenceEdit.setClearButtonEnabled(enable)#
- Parameters:
enable – bool
See also
Setter of property clearButtonEnabled
.
- PySide6.QtWidgets.QKeySequenceEdit.setFinishingKeyCombinations(finishingKeyCombinations)#
- Parameters:
finishingKeyCombinations –
See also
Setter of property finishingKeyCombinations
.
- PySide6.QtWidgets.QKeySequenceEdit.setKeySequence(keySequence)#
- Parameters:
keySequence –
PySide6.QtGui.QKeySequence
See also
Setter of property keySequence
.
- PySide6.QtWidgets.QKeySequenceEdit.setMaximumSequenceLength(count)#
- Parameters:
count –
qsizetype
See also
Setter of property maximumSequenceLength
.