本文整理汇总了Python中qtpy.PYQT4属性的典型用法代码示例。如果您正苦于以下问题:Python qtpy.PYQT4属性的具体用法?Python qtpy.PYQT4怎么用?Python qtpy.PYQT4使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类qtpy
的用法示例。
在下文中一共展示了qtpy.PYQT4属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_compatibility
# 需要导入模块: import qtpy [as 别名]
# 或者: from qtpy import PYQT4 [as 别名]
def check_compatibility(self):
"""Check if current Qt backend version is greater or equal to 5."""
message = ''
valid = True
if PYQT4 or PYSIDE:
message = _('<b>spyder-terminal</b> doesn\'t work with Qt 4. '
'Therefore, this plugin will be deactivated.')
valid = False
if WINDOWS:
try:
import winpty
del winpty
except:
message = _('Unfortunately, the library that <b>spyder-termina'
'l</b> uses to create terminals is failing to '
'work in your system. Therefore, this plugin will '
'be deactivated.<br><br> This usually happens on '
'Windows 7 systems. If that\'s the case, please '
'consider updating to a newer Windows version.')
valid = False
return valid, message
# ------ SpyderPluginWidget API ------------------------------
示例2: dataChanged
# 需要导入模块: import qtpy [as 别名]
# 或者: from qtpy import PYQT4 [as 别名]
def dataChanged(self, topLeft, bottomRight, roles=[]):
"""Called when data in model has changed."""
if PYQT4:
QTreeView.dataChanged(self, topLeft, bottomRight)
else:
QTreeView.dataChanged(self, topLeft, bottomRight, roles)
self.resizeColumns()
while topLeft.parent().isValid():
topLeft = topLeft.parent()
while bottomRight.parent().isValid():
bottomRight = bottomRight.parent()
self.spanFirstColumn(topLeft.row(), bottomRight.row())
示例3: check_compatibility
# 需要导入模块: import qtpy [as 别名]
# 或者: from qtpy import PYQT4 [as 别名]
def check_compatibility(self):
"""
Check plugin requirements.
- PyQt version is greater or equal to 5.
"""
messages = []
valid = True
if PYQT4 or PYSIDE:
messages.append('Spyder-reports does not work with Qt4')
valid = False
return valid, ", ".join(messages)
# -------------------------------------------------------------------------