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


Python Qt.PYQT_VERSION_STR属性代码示例

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


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

示例1: versions

# 需要导入模块: from PyQt5 import Qt [as 别名]
# 或者: from PyQt5.Qt import PYQT_VERSION_STR [as 别名]
def versions():
    print("ScudCloud", __version__)
    print("Python", platform.python_version())
    print("Qt", QT_VERSION_STR)
    print("WebKit", qWebKitVersion())
    print("PyQt", PYQT_VERSION_STR)
    print("SIP", SIP_VERSION_STR) 
开发者ID:raelgc,项目名称:scudcloud,代码行数:9,代码来源:__main__.py

示例2: main

# 需要导入模块: from PyQt5 import Qt [as 别名]
# 或者: from PyQt5.Qt import PYQT_VERSION_STR [as 别名]
def main():
    """
    Application entry point.
    """
    parser = ArgumentParser()
    parser.add_argument('--nosplash', dest='nosplash', action='store_true')
    parser.add_argument('--tests', dest='tests', action='store_true')
    parser.add_argument('--open', dest='open', default=None)

    sys.excepthook = base_except_hook

    options, _ = parser.parse_known_args(args=sys.argv)

    global app
    app = Eddy(options, sys.argv)
    if app.isRunning():
        sys.exit(0)

    LOGGER.separator(separator='-')
    LOGGER.frame('%s v%s', APPNAME, VERSION, separator='|')
    LOGGER.frame(COPYRIGHT, separator='|')
    LOGGER.separator(separator='-')
    LOGGER.frame('OS: %s %s', platform.system(), platform.release(), separator='|')
    LOGGER.frame('Python version: %s', platform.python_version(), separator='|')
    LOGGER.frame('Qt version: %s', QtCore.QT_VERSION_STR, separator='|')
    LOGGER.frame('PyQt version: %s', Qt.PYQT_VERSION_STR, separator='|')
    LOGGER.frame('SIP version: %s', SIP_VERSION_STR, separator='|')
    LOGGER.separator(separator='-')

    app.configure(options)
    app.start(options)
    sys.exit(app.exec_()) 
开发者ID:danielepantaleone,项目名称:eddy,代码行数:34,代码来源:run.py

示例3: pre_instalation_tests

# 需要导入模块: from PyQt5 import Qt [as 别名]
# 或者: from PyQt5.Qt import PYQT_VERSION_STR [as 别名]
def pre_instalation_tests():
    # make tests before installing
    # to avoid risking breaking instalation do it in a try
    try:
        from tests.qt import test_matplotlib_qt_backend
        ans = test_matplotlib_qt_backend()
        if ans is False:
            exit(-1)
    except:
        pass

    # test dependencies
    from pkg_resources import parse_version
    dependencies = {
        'pyart': '1.6',
        'matplotlib': '1.1.0',
        # 'mpl_toolkits.basemap': '0.99',
        }
    for key in dependencies.keys():
        dep = __import__(key, locals(), globals(), ['__name__'])
        if dependencies[key] is not None:
            if (parse_version(dep.__version__) <
                parse_version(dependencies[key])):
                raise Exception('Missing Dependency: %s >= %s. Has %s, %s' %
                                (key, dependencies[key], key, dep.__version__))

    # test pyqt4 (non standard version)
    try:
        from PyQt4.Qt import PYQT_VERSION_STR
        if (parse_version(PYQT_VERSION_STR) <
            parse_version('4.6')):
            raise Exception('Missing Dependency: %s >= %s. Has %s, %s' %
                            ('PyQt4', '4.6', 'PyQt4', PYQT_VERSION_STR))
    except ImportError:
        try:
            from PyQt5.Qt import PYQT_VERSION_STR
        except ImportError:
            raise Exception('Missing Dependency: PyQt') 
开发者ID:nguy,项目名称:artview,代码行数:40,代码来源:setup.py

示例4: pytest_report_header

# 需要导入模块: from PyQt5 import Qt [as 别名]
# 或者: from PyQt5.Qt import PYQT_VERSION_STR [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 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:57,代码来源:conftest.py


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