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


Python Qt.PointingHandCursor方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, colors, *args, **kwargs):
        super(CColorItems, self).__init__(*args, **kwargs)
        self.setItemDelegate(StyledItemDelegate(self))
        self.setEditTriggers(self.NoEditTriggers)
        self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.setFlow(self.LeftToRight)
        self.setWrapping(True)
        self.setResizeMode(self.Adjust)
        self.setSpacing(6)
        self.setCursor(Qt.PointingHandCursor)
        self.setFrameShape(self.NoFrame)
        self._model = QStandardItemModel(self)
        self.setModel(self._model)

        for color in colors:
            self.addColor(color) 
开发者ID:PyQt5,项目名称:CustomWidgets,代码行数:18,代码来源:CColorItems.py

示例2: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, parent=None):
        super(SearchLineEdit, self).__init__()
        self.setObjectName("SearchLine")
        self.parent = parent
        self.setMinimumSize(218, 20)
        with open('QSS/searchLine.qss', 'r') as f:
            self.setStyleSheet(f.read())

        self.button = QPushButton(self)
        self.button.setMaximumSize(13, 13)
        self.button.setCursor(QCursor(Qt.PointingHandCursor))

        self.setTextMargins(3, 0, 19, 0)

        self.spaceItem = QSpacerItem(150, 10, QSizePolicy.Expanding)

        self.mainLayout = QHBoxLayout()
        self.mainLayout.addSpacerItem(self.spaceItem)
        # self.mainLayout.addStretch(1)
        self.mainLayout.addWidget(self.button)
        self.mainLayout.addSpacing(10)
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.mainLayout) 
开发者ID:HuberTRoy,项目名称:MusicBox,代码行数:25,代码来源:addition.py

示例3: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, types, parent=None, color=Qt.black):
        """
        :param types:                    渐变类型(0-透明,1-彩虹)
        :param parent:
        """
        super(CColorSlider, self).__init__(Qt.Horizontal, parent)
        self.setObjectName('Custom_Color_Slider')
        self.setCursor(Qt.PointingHandCursor)
        self.valueChanged.connect(self.onValueChanged)
        self._types = types
        self._color = color
        self._isFirstShow = True
        self._imageRainbow = None                       # 彩虹背景图
        self._imageAlphaColor = None                    # 带颜色透明图
        self._imageAlphaTmp = None                      # 透明方格
        self._imageAlpha = None                         # 带颜色透明背景和方格合成图
        self._imageCircle = None                        # 圆形滑块图
        self._imageCircleHover = None                   # 圆形滑块悬停图
        self.setToolTip('彩虹色' if self._types == self.TypeRainbow else '透明度') 
开发者ID:PyQt5,项目名称:CustomWidgets,代码行数:21,代码来源:CColorSlider.py

示例4: initUI

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def initUI(self):

      # ================== WIDGET QPUSHBUTTON ====================

        buttonRedondo = QPushButton("2019", self)
        buttonRedondo.setToolTip("Botón redondo")
        buttonRedondo.setCursor(Qt.PointingHandCursor)

        buttonRedondo.setFixedWidth(58)
        buttonRedondo.setFixedHeight(58)
        buttonRedondo.setMask(QRegion(QRect(-1, -1, 59, 59), QRegion.Ellipse))

        buttonRedondo.setStyleSheet("QPushButton {background-color: yellow; border: 1.8px solid black; "
                                    "border-radius: 29.4px} QPushButton:pressed "
                                    "{background-color: white;}")
        
        buttonRedondo.move(171, 80)

      # =================== EVENTO QPUSHBUTTON ===================

        buttonRedondo.clicked.connect(self.botonPresionado)

  # ======================= FUNCIONES ============================ 
开发者ID:andresnino,项目名称:PyQt5,代码行数:25,代码来源:botonRedondo.py

示例5: initUI

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def initUI(self):

      # ==================== WIDGET QLABEL =======================
        
        self.labelImagen = QLabelClickable(self)
        self.labelImagen.setGeometry(15, 15, 118, 130)
        self.labelImagen.setToolTip("Imagen")
        self.labelImagen.setCursor(Qt.PointingHandCursor)

        self.labelImagen.setStyleSheet("QLabel {background-color: white; border: 1px solid "
                                       "#01DFD7; border-radius: 5px;}")

        self.pixmapImagen = QPixmap("Qt.png").scaled(112, 128, Qt.KeepAspectRatio,
                                                     Qt.SmoothTransformation)
        self.labelImagen.setPixmap(self.pixmapImagen)
        self.labelImagen.setAlignment(Qt.AlignCenter)

      # ===================== EVENTO QLABEL ======================

      # Llamar función al hacer clic o doble clic sobre el label
        self.labelImagen.clicked.connect(self.Clic)

  # ======================= FUNCIONES ============================ 
开发者ID:andresnino,项目名称:PyQt5,代码行数:25,代码来源:QLabel_clickable.py

示例6: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, *args, **kwargs):
        """Same constructor as QLineEdit + config validator
        """
        self.url = "https://eomys.com/"

        # Call the QLabel constructor
        super(HelpButton, self).__init__(*args, **kwargs)

        self.setCursor(QCursor(Qt.PointingHandCursor))
        self.setPixmap(QPixmap(":/images/images/icon/help_16.png")) 
开发者ID:Eomys,项目名称:pyleecan,代码行数:12,代码来源:HelpButton.py

示例7: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, parent=None):
        super(LogsPage, self).__init__(parent)
        self.parent = parent
        self.setObjectName('settingslogspage')
        verboseCheckbox = QCheckBox('Enable verbose logging', self)
        verboseCheckbox.setToolTip('Detailed log ouput to log file and console')
        verboseCheckbox.setCursor(Qt.PointingHandCursor)
        verboseCheckbox.setChecked(self.parent.parent.parent.verboseLogs)
        verboseCheckbox.stateChanged.connect(self.setVerboseLogs)
        verboseLabel = QLabel('''
            <b>ON:</b> includes detailed logs from video player (MPV) and backend services
            <br/>
            <b>OFF:</b> includes errors and important messages to log and console
        ''', self)
        verboseLabel.setObjectName('verboselogslabel')
        verboseLabel.setTextFormat(Qt.RichText)
        verboseLabel.setWordWrap(True)
        logsLayout = QVBoxLayout()
        logsLayout.addWidget(verboseCheckbox)
        logsLayout.addWidget(verboseLabel)
        logsGroup = QGroupBox('Logging')
        logsGroup.setLayout(logsLayout)
        mainLayout = QVBoxLayout()
        mainLayout.setSpacing(15)
        mainLayout.addWidget(logsGroup)
        mainLayout.addStretch(1)
        self.setLayout(mainLayout) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:29,代码来源:settings.py

示例8: keyPressEvent

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def keyPressEvent(self, event: QKeyEvent) -> None:
        qApp.sendEvent(self.parent, event)

    # def mouseMoveEvent(self, event: QMouseEvent) -> None:
    #     opt = QStyleOptionSlider()
    #     self.initStyleOption(opt)
    #     handle = self.style().subControlRect(QStyle.CC_Slider, opt, QStyle.SC_SliderHandle, self)
    #     if handle.x() <= event.pos().x() <= (handle.x() + handle.width()):
    #         self.setCursor(Qt.PointingHandCursor)
    #         self._handleHover = True
    #     else:
    #         self.unsetCursor()
    #         self._handleHover = False
    #     self.initStyle()
    #     super(VideoSlider, self).mouseMoveEvent(event) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:17,代码来源:videoslider.py

示例9: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, stream_index: int, tooltip: str, parent):
        super(StreamSelectorCheckBox, self).__init__(parent)
        self.parent = parent
        self.setObjectName('streamcheckbox')
        self.setCursor(Qt.PointingHandCursor)
        self.setToolTip(tooltip)
        self.setChecked(self.parent.config[stream_index])
        self.stateChanged.connect(lambda state, index=stream_index: self.updateConfig(index, state == Qt.Checked)) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:10,代码来源:mediastream.py

示例10: enterEvent

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def enterEvent(self, event):  # pylint: disable=invalid-name
        self.setCursor(Qt.PointingHandCursor)
        super().enterEvent(event) 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:5,代码来源:switch_button.py

示例11: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.setCursor(QCursor(Qt.PointingHandCursor))
        self.full_text = "" 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:6,代码来源:custom_widgets.py

示例12: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, message, button_texts, radio_mode=False):
        super().__init__()
        self.setupUi(self)
        self.status = None
        self.dialog = None
        self.label_message.setText(message)
        for text in button_texts:
            b = Button(text)
            b.clicked_self.connect(self._on_button_clicked)
            b.setCursor(Qt.PointingHandCursor)
            if radio_mode:
                self.layout_radios.addWidget(b)
            else:
                self.layout_buttons.insertWidget(1, b) 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:16,代码来源:custom_dialogs.py

示例13: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, *args, **kwargs):
        super(CSlider, self).__init__(*args, **kwargs)
        self.setCursor(Qt.PointingHandCursor)
        self.setStyleSheet(Style) 
开发者ID:PyQt5,项目名称:CustomWidgets,代码行数:6,代码来源:CSlider.py

示例14: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def __init__(self, *args, **kwargs):
        super(TestCFramelessBase, self).__init__(*args, **kwargs)
        self.resize(500, 400)
        layout = QVBoxLayout(self)
        layout.setSpacing(0)
        # 添加自定义标题栏
        layout.addWidget(CTitleBar(self, title='CTitleBar'))
        layout.addWidget(QLineEdit('输入框', self))
        # 底部空白占位
        layout.addWidget(
            QWidget(self, objectName='bottomWidget', cursor=Qt.PointingHandCursor)) 
开发者ID:PyQt5,项目名称:CustomWidgets,代码行数:13,代码来源:TestCFramelessWidget.py

示例15: initUI

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import PointingHandCursor [as 别名]
def initUI(self):

      # ==================== WIDGET QLABEL =======================
        
        self.labelImagen = QLabelClickable(self)
        self.labelImagen.setGeometry(15, 15, 118, 130)
        self.labelImagen.setToolTip("Imagen")
        self.labelImagen.setCursor(Qt.PointingHandCursor)

        self.labelImagen.setStyleSheet("QLabel {background-color: white; border: 1px solid "
                                       "#01DFD7; border-radius: 5px;}")
        
        self.labelImagen.setAlignment(Qt.AlignCenter)

      # ================= WIDGETS QPUSHBUTTON ====================

        buttonSeleccionar = QPushButton("Seleccionar", self)
        buttonSeleccionar.setToolTip("Seleccionar imagen")
        buttonSeleccionar.setCursor(Qt.PointingHandCursor)
        buttonSeleccionar.setGeometry(143, 15, 120, 25)

        buttonEliminar = QPushButton("Eliminar", self)
        buttonEliminar.setToolTip("Eliminar imagen")
        buttonEliminar.setCursor(Qt.PointingHandCursor)
        buttonEliminar.setGeometry(143, 45, 120, 25)

      # ===================== EVENTO QLABEL ======================

      # Llamar función al hacer clic sobre el label
        self.labelImagen.clicked.connect(self.seleccionarImagen)

      # ================== EVENTOS QPUSHBUTTON ===================

        buttonSeleccionar.clicked.connect(self.seleccionarImagen)
        buttonEliminar.clicked.connect(lambda: self.labelImagen.clear())
     

  # ======================= FUNCIONES ============================ 
开发者ID:andresnino,项目名称:PyQt5,代码行数:40,代码来源:mostrarImagen.py


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