Python PyQt4.QtGui.QCursor() Examples
The following are 8
code examples of PyQt4.QtGui.QCursor().
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
PyQt4.QtGui
, or try the search function
.
Example #1
Source File: CartoDBToolbar.py From qgis-cartodb with GNU General Public License v2.0 | 6 votes |
def setupUi(self): self.connectLayout = QHBoxLayout(self) self.connectLayout.setSizeConstraint(QLayout.SetDefaultConstraint) self.avatarLB = QLabel(self) sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.avatarLB.sizePolicy().hasHeightForWidth()) self.avatarLB.setSizePolicy(sizePolicy) self.avatarLB.setFixedSize(24, 24) self.avatarLB.hide() self.nameLB = QLabel(self) self.nameLB.setFocusPolicy(Qt.ClickFocus) self.nameLB.setTextFormat(Qt.RichText) self.nameLB.setText("<html><head/><body><p><span style=\"text-decoration: underline; color:#00557f;\">Add Connection</span></p></body></html>") self.setCursor(QCursor(Qt.PointingHandCursor)) self.connectLayout.addWidget(self.avatarLB) self.connectLayout.addWidget(self.nameLB)
Example #2
Source File: appgui.py From mishkal with GNU General Public License v3.0 | 6 votes |
def doHeavyLifting(self): """ UI callback, starts the thread with the proper arguments. """ if self.thread: # Sanity check. return self.singleProgress.setValue(1) self.progressDialog.show(); self.mytimer.start(1000); QtGui.QApplication.setOverrideCursor( QtGui.QCursor(QtCore.Qt.WaitCursor)) self.thread = WorkThread(target=self.display_result) QtCore.QObject.connect(self.thread, QtCore.SIGNAL("mainThread"), self.mainThread) QtCore.QObject.connect(self.thread, QtCore.SIGNAL("finished()"), self.threadDone) self.thread.start()
Example #3
Source File: cityscapesLabelTool.py From fcn8s_tensorflow with GNU General Public License v3.0 | 5 votes |
def keyPressEvent(self,e): # Ctrl key changes mouse cursor if e.key() == QtCore.Qt.Key_Control: QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) # Backspace deletes last point from polygon elif e.key() == QtCore.Qt.Key_Backspace: if not self.drawPolyClosed: del self.drawPoly[-1] self.update() # set alpha to temporary zero elif e.key() == QtCore.Qt.Key_0: self.transpTempZero = True self.update() elif e.key() == QtCore.Qt.Key_E: self.select_next_correction() elif e.key() == QtCore.Qt.Key_R: self.select_previous_correction() elif e.key() == QtCore.Qt.Key_1: self.modify_correction_type(CorrectionBox.types.TO_CORRECT) elif e.key() == QtCore.Qt.Key_2: self.modify_correction_type(CorrectionBox.types.TO_REVIEW) elif e.key() == QtCore.Qt.Key_3: self.modify_correction_type(CorrectionBox.types.RESOLVED) elif e.key() == QtCore.Qt.Key_4: self.modify_correction_type(CorrectionBox.types.QUESTION) elif e.key() == QtCore.Qt.Key_D and self.config.correctionMode: self.delete_selected_annotation() elif e.key() == QtCore.Qt.Key_M and self.config.correctionMode: self.modify_correction_description() # Key released
Example #4
Source File: widgets.py From kano-burners with GNU General Public License v2.0 | 5 votes |
def enterEvent(self, event): QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) return super(HoverButton, self).enterEvent(event) # @Override
Example #5
Source File: widgets.py From kano-burners with GNU General Public License v2.0 | 5 votes |
def enterEvent(self, event): QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) return super(ComboBox, self).enterEvent(event) # @Override
Example #6
Source File: cityscapesLabelTool.py From LightNet with MIT License | 5 votes |
def keyPressEvent(self,e): # Ctrl key changes mouse cursor if e.key() == QtCore.Qt.Key_Control: QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) # Backspace deletes last point from polygon elif e.key() == QtCore.Qt.Key_Backspace: if not self.drawPolyClosed: del self.drawPoly[-1] self.update() # set alpha to temporary zero elif e.key() == QtCore.Qt.Key_0: self.transpTempZero = True self.update() elif e.key() == QtCore.Qt.Key_E: self.select_next_correction() elif e.key() == QtCore.Qt.Key_R: self.select_previous_correction() elif e.key() == QtCore.Qt.Key_1: self.modify_correction_type(CorrectionBox.types.TO_CORRECT) elif e.key() == QtCore.Qt.Key_2: self.modify_correction_type(CorrectionBox.types.TO_REVIEW) elif e.key() == QtCore.Qt.Key_3: self.modify_correction_type(CorrectionBox.types.RESOLVED) elif e.key() == QtCore.Qt.Key_4: self.modify_correction_type(CorrectionBox.types.QUESTION) elif e.key() == QtCore.Qt.Key_D and self.config.correctionMode: self.delete_selected_annotation() elif e.key() == QtCore.Qt.Key_M and self.config.correctionMode: self.modify_correction_description() # Key released
Example #7
Source File: cityscapesLabelTool.py From TFSegmentation with Apache License 2.0 | 5 votes |
def keyPressEvent(self,e): # Ctrl key changes mouse cursor if e.key() == QtCore.Qt.Key_Control: QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) # Backspace deletes last point from polygon elif e.key() == QtCore.Qt.Key_Backspace: if not self.drawPolyClosed: del self.drawPoly[-1] self.update() # set alpha to temporary zero elif e.key() == QtCore.Qt.Key_0: self.transpTempZero = True self.update() elif e.key() == QtCore.Qt.Key_E: self.select_next_correction() elif e.key() == QtCore.Qt.Key_R: self.select_previous_correction() elif e.key() == QtCore.Qt.Key_1: self.modify_correction_type(CorrectionBox.types.TO_CORRECT) elif e.key() == QtCore.Qt.Key_2: self.modify_correction_type(CorrectionBox.types.TO_REVIEW) elif e.key() == QtCore.Qt.Key_3: self.modify_correction_type(CorrectionBox.types.RESOLVED) elif e.key() == QtCore.Qt.Key_4: self.modify_correction_type(CorrectionBox.types.QUESTION) elif e.key() == QtCore.Qt.Key_D and self.config.correctionMode: self.delete_selected_annotation() elif e.key() == QtCore.Qt.Key_M and self.config.correctionMode: self.modify_correction_description() # Key released
Example #8
Source File: cityscapesLabelTool.py From Detectron-PYTORCH with Apache License 2.0 | 5 votes |
def keyPressEvent(self,e): # Ctrl key changes mouse cursor if e.key() == QtCore.Qt.Key_Control: QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) # Backspace deletes last point from polygon elif e.key() == QtCore.Qt.Key_Backspace: if not self.drawPolyClosed: del self.drawPoly[-1] self.update() # set alpha to temporary zero elif e.key() == QtCore.Qt.Key_0: self.transpTempZero = True self.update() elif e.key() == QtCore.Qt.Key_E: self.select_next_correction() elif e.key() == QtCore.Qt.Key_R: self.select_previous_correction() elif e.key() == QtCore.Qt.Key_1: self.modify_correction_type(CorrectionBox.types.TO_CORRECT) elif e.key() == QtCore.Qt.Key_2: self.modify_correction_type(CorrectionBox.types.TO_REVIEW) elif e.key() == QtCore.Qt.Key_3: self.modify_correction_type(CorrectionBox.types.RESOLVED) elif e.key() == QtCore.Qt.Key_4: self.modify_correction_type(CorrectionBox.types.QUESTION) elif e.key() == QtCore.Qt.Key_D and self.config.correctionMode: self.delete_selected_annotation() elif e.key() == QtCore.Qt.Key_M and self.config.correctionMode: self.modify_correction_description() # Key released