-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31424ab
commit 0aef42c
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from PyQt6.QtGui import QKeySequence | ||
from PyQt6.QtWidgets import QKeySequenceEdit | ||
from var_dump import var_dump | ||
|
||
class oneKeyQKeySequenceEdit(QKeySequenceEdit): | ||
def __init__(self, parent=None): | ||
super(oneKeyQKeySequenceEdit, self).__init__(parent) | ||
self._string = '' | ||
def keyPressEvent(self, QKeyEvent): | ||
super(oneKeyQKeySequenceEdit, self).keyPressEvent(QKeyEvent) | ||
value = self.keySequence() | ||
self._string = self.keySequence().toString() | ||
self.setKeySequence(value) | ||
|