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


Python Qt.WheelFocus方法代码示例

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


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

示例1: run

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WheelFocus [as 别名]
def run(self):
        Instance.record("view", JWebView(self.config))

        if self.config['window']["transparent"]:
            from JAK.Utils import JavaScript
            JavaScript.css(
                "body, html {background-color:transparent !important;background-image:none !important;}", "JAK"
            )

        if self.config['webview']["addCSS"]:
            from JAK.Utils import JavaScript
            JavaScript.css(self.config['webview']["addCSS"], "user")
            print("Custom CSS detected")

        if self.config['webview']["runJavaScript"]:
            from JAK.Utils import JavaScript
            JavaScript.send(self.config['webview']["runJavaScript"])
            print("Custom JavaScript detected")

        win = Instance.auto("win", JWindow(self.config))
        if self.config['window']["fullScreen"]:
            screen = getScreenGeometry()
            win.resize(screen.width(), screen.height())
        else:
            win.resize(win.default_size("width"), win.default_size("height"))

        win.setFocusPolicy(Qt.WheelFocus)
        win.show()
        win.setFocus()
        win.window_original_position = win.frameGeometry()
        result = self.exec_()
        sys.exit(result) 
开发者ID:codesardine,项目名称:Jade-Application-Kit,代码行数:34,代码来源:Application.py

示例2: tx_tabelaReceber

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WheelFocus [as 别名]
def tx_tabelaReceber(self, tabela, row, col, status, valor):
        item = QtWidgets.QLineEdit()
        # item.setGeometry(QRect(310, 360, 80, 30))
        # item.setFixedWidth(60)
        if status == 1:
            item.setReadOnly(True)
        item.setText(valor)
        item.setFocusPolicy(Qt.WheelFocus)
        item.setStyleSheet("QLineEdit{\n"
                           "background: #F1F1F1;\n"
                           "border: 2px solid #CFCFCF;\n"
                           "color: #000;\n"
                           "font: 12px \"Arial\" ;\n"
                           "text-transform: uppercase;\n"
                           "font-weight: bold\n"
                           "}\n"
                           "QLineEdit:Focus {\n"
                           "border: 1px solid red;\n"
                           "}")
        item.setAlignment(
            Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)
        item.setObjectName("tx_ValorPago")
        item.setPlaceholderText("R$ 0.00")
        tabela.setCellWidget(row, col, item)
    

    #Input data tabela parcelas 
开发者ID:andrersp,项目名称:controleEstoque,代码行数:29,代码来源:main.py

示例3: OnCreate

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WheelFocus [as 别名]
def OnCreate(self, form):
        self.form = form
        self.parent = self.FormToPyQtWidget(form)

        vl = QVBoxLayout()
        hl = QHBoxLayout()
        hl2 = QHBoxLayout()
        hl3 = QHBoxLayout()
        hl4 = QHBoxLayout()

        flt = QLabel()  
        flt.setText('Filter:')
        hl.addWidget(flt)

        self.cb = QCheckBox('Sync')
        self.cb.setChecked(True)
        self.cb.stateChanged.connect(self._toggle_sync)
        hl2.addWidget(self.cb)

        self.status = QLabel()
        self.status.setText('Cyber, cyber!')
        hl4.addWidget(self.status)

        self.pw = PixelWidget(self.parent, IDACyberForm.idbh)
        self.pw.setFocusPolicy(Qt.StrongFocus | Qt.WheelFocus)

        self.pw.statechanged.connect(self._update_widget)
        self.pw.next_filter.connect(self._select_next_filter)
        self.pw.prev_filter.connect(self._select_prev_filter)

        self.filterlist = self._load_filters(self.pw)
        if not len(self.filterlist):
            ida_kernwin.warning("IDACyber: no filters found within /plugins/cyber/")
            return

        self.pw.set_filter(self.filterlist[0][1], 0)
        self.pw.set_addr(ida_kernwin.get_screen_ea())

        self.filterChoser = QComboBox()
        self.filterChoser.addItems([obj.name for filter, obj in self.filterlist])
        self.filterChoser.currentIndexChanged.connect(self._select_filter)
        hl.addWidget(self.filterChoser)
        hl.addStretch(1)

        vl.addWidget(self.pw)

        vl.addLayout(hl)
        vl.addLayout(hl2)
        vl.addLayout(hl3)
        vl.addLayout(hl4)

        self.parent.setLayout(vl)
        if IDACyberForm.hook is not None:
                IDACyberForm.hook.new_ea.connect(self._change_screen_ea)
        self.clean_init = True
        return

# ----------------------------------------------------------------------- 
开发者ID:patois,项目名称:IDACyber,代码行数:60,代码来源:idacyber.py


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