本文整理汇总了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)
示例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
示例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
# -----------------------------------------------------------------------