当前位置: 首页>>代码示例>>Python>>正文


Python QtGui.QCursor方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QCursor方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QCursor方法的具体用法?Python QtGui.QCursor怎么用?Python QtGui.QCursor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui的用法示例。


在下文中一共展示了QtGui.QCursor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QCursor [as 别名]
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) 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:22,代码来源:CartoDBToolbar.py

示例2: doHeavyLifting

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QCursor [as 别名]
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() 
开发者ID:linuxscout,项目名称:mishkal,代码行数:20,代码来源:appgui.py

示例3: keyPressEvent

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QCursor [as 别名]
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 
开发者ID:pierluigiferrari,项目名称:fcn8s_tensorflow,代码行数:33,代码来源:cityscapesLabelTool.py

示例4: enterEvent

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QCursor [as 别名]
def enterEvent(self, event):
        QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        return super(HoverButton, self).enterEvent(event)

    # @Override 
开发者ID:KanoComputing,项目名称:kano-burners,代码行数:7,代码来源:widgets.py


注:本文中的PyQt4.QtGui.QCursor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。