Python PyQt5.QtCore.Qt.Key_E() Examples
The following are 5
code examples of PyQt5.QtCore.Qt.Key_E().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt5.QtCore.Qt
, or try the search function
.
Example #1
Source File: SupportEraser.py From Cura with GNU Lesser General Public License v3.0 | 6 votes |
def __init__(self): super().__init__() self._shortcut_key = Qt.Key_E self._controller = self.getController() self._selection_pass = None CuraApplication.getInstance().globalContainerStackChanged.connect(self._updateEnabled) # Note: if the selection is cleared with this tool active, there is no way to switch to # another tool than to reselect an object (by clicking it) because the tool buttons in the # toolbar will have been disabled. That is why we need to ignore the first press event # after the selection has been cleared. Selection.selectionChanged.connect(self._onSelectionChanged) self._had_selection = False self._skip_press = False self._had_selection_timer = QTimer() self._had_selection_timer.setInterval(0) self._had_selection_timer.setSingleShot(True) self._had_selection_timer.timeout.connect(self._selectionChangeDelay)
Example #2
Source File: SWTrackerViewer.py From tierpsy-tracker with MIT License | 6 votes |
def keyPressEvent(self, event): # go the previous block if event.key() == Qt.Key_BracketLeft: self.ui.spinBox_skelBlock.setValue(self.skel_block_n - 1) # go to the next block elif event.key() == Qt.Key_BracketRight: self.ui.spinBox_skelBlock.setValue(self.skel_block_n + 1) elif event.key() == Qt.Key_Semicolon: if self.ui.checkBox_showLabel.isChecked(): self.ui.checkBox_showLabel.setChecked(0) else: self.ui.checkBox_showLabel.setChecked(1) elif event.key() == Qt.Key_E: self.egg_writer.add(self.vfilename, self.frame_number) elif event.key() == Qt.Key_X: self.egg_writer.tag_bad() super().keyPressEvent(event)
Example #3
Source File: Console.py From tdm with GNU General Public License v3.0 | 6 votes |
def eventFilter(self, obj, e): if obj == self.command and e.type() == QEvent.KeyPress: history = self.device.history if e.modifiers() & Qt.ControlModifier: if e.key() == Qt.Key_H: d = DeviceConsoleHistory(self.device.env.devices) if d.exec_() == QDialog.Accepted: self.command.setText(d.command) elif len(history) > 0: if e.key() == Qt.Key_E: self.command.setText(history[0]) if e.key() == Qt.Key_Down: self.command.completer().setModel(QStringListModel(history)) self.command.setText(' ') self.command.completer().complete() return False return QDockWidget.eventFilter(self, obj, e)
Example #4
Source File: test_keyutils.py From qutebrowser with GNU General Public License v3.0 | 5 votes |
def test_init(self): seq = keyutils.KeySequence(Qt.Key_A, Qt.Key_B, Qt.Key_C, Qt.Key_D, Qt.Key_E) assert len(seq._sequences) == 2 assert len(seq._sequences[0]) == 4 assert len(seq._sequences[1]) == 1
Example #5
Source File: test_keyutils.py From qutebrowser with GNU General Public License v3.0 | 5 votes |
def test_iter(self): seq = keyutils.KeySequence(Qt.Key_A | Qt.ControlModifier, Qt.Key_B | Qt.ShiftModifier, Qt.Key_C, Qt.Key_D, Qt.Key_E) expected = [keyutils.KeyInfo(Qt.Key_A, Qt.ControlModifier), keyutils.KeyInfo(Qt.Key_B, Qt.ShiftModifier), keyutils.KeyInfo(Qt.Key_C, Qt.NoModifier), keyutils.KeyInfo(Qt.Key_D, Qt.NoModifier), keyutils.KeyInfo(Qt.Key_E, Qt.NoModifier)] assert list(seq) == expected