Skip to content

Commit cbde4b2

Browse files
committed
♿Add PySide2 compatibility
1 parent 2fd6a39 commit cbde4b2

3 files changed

Lines changed: 140 additions & 41 deletions

File tree

openhand_classifier/src/DatasetController.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, parent):
4646
self.layout.addWidget(self.minusButton, 1,1,1,1)
4747
self.minusButton.setEnabled(False)
4848
self.minusButton.clicked.connect(lambda: self.setCurrentDataIndex(self.currentDataIndex-1))
49-
QtWidgets.QShortcut(QtCore.Qt.Key_Left, self, lambda: self.setCurrentDataIndex(self.currentDataIndex-1))
49+
QtWidgets.QShortcut(QtGui.QKeySequence("left"), self, lambda: self.setCurrentDataIndex(self.currentDataIndex-1))
5050

5151
self.currentIndexLine = QtWidgets.QLineEdit(str(self.currentDataIndex))
5252
self.currentIndexLine.setValidator(QtGui.QDoubleValidator())
@@ -64,7 +64,7 @@ def __init__(self, parent):
6464
self.layout.addWidget(self.plusButton, 1,4,1,1)
6565
self.plusButton.setEnabled(False)
6666
self.plusButton.clicked.connect(lambda: self.setCurrentDataIndex(self.currentDataIndex+1))
67-
QtWidgets.QShortcut(QtCore.Qt.Key_Right, self, lambda: self.setCurrentDataIndex(self.currentDataIndex+1))
67+
QtWidgets.QShortcut(QtGui.QKeySequence("right"), self, lambda: self.setCurrentDataIndex(self.currentDataIndex+1))
6868

6969
self.deleteButton = QtWidgets.QPushButton('Delete entry')
7070
self.deleteButton.setEnabled(False)

poetry.lock

Lines changed: 136 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)