本文整理汇总了Python中PySide.QtCore.__version__方法的典型用法代码示例。如果您正苦于以下问题:Python QtCore.__version__方法的具体用法?Python QtCore.__version__怎么用?Python QtCore.__version__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore
的用法示例。
在下文中一共展示了QtCore.__version__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_numpy_f2py___version__
# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import __version__ [as 别名]
def load_numpy_f2py___version__(finder, module):
"""the numpy.f2py.__version__ module optionally imports the __svn_version__
module; ignore the error if the module cannot be found."""
module.IgnoreName("__svn_version__")
示例2: load_PySide_QtGui
# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import __version__ [as 别名]
def load_PySide_QtGui(finder, module):
"""There is a chance that GUI will use some image formats
add the image format plugins
"""
from PySide import QtCore
# Pyside.__version* is PySide version, PySide.QtCore.__version* is Qt version
_QtGui(finder, module, QtCore.__version__)
示例3: pytest_report_header
# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import __version__ [as 别名]
def pytest_report_header(config):
"""
This function is used by py.test to insert a customized header into the
test report.
"""
versions = os.linesep
versions += 'PyQt4: '
try:
from PyQt4 import Qt
versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR)
except ImportError:
versions += 'not installed'
except AttributeError:
versions += 'unknown version'
versions += os.linesep
versions += 'PyQt5: '
try:
from PyQt5 import Qt
versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR)
except ImportError:
versions += 'not installed'
except AttributeError:
versions += 'unknown version'
versions += os.linesep
versions += 'PySide: '
try:
import PySide
from PySide import QtCore
versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__)
except ImportError:
versions += 'not installed'
except AttributeError:
versions += 'unknown version'
versions += os.linesep
versions += 'PySide2: '
try:
import PySide2
from PySide2 import QtCore
versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__)
except ImportError:
versions += 'not installed'
except AttributeError:
versions += 'unknown version'
versions += os.linesep
return versions