當前位置: 首頁>>代碼示例>>Python>>正文


Python QtCore.__version__方法代碼示例

本文整理匯總了Python中PySide2.QtCore.__version__方法的典型用法代碼示例。如果您正苦於以下問題:Python QtCore.__version__方法的具體用法?Python QtCore.__version__怎麽用?Python QtCore.__version__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PySide2.QtCore的用法示例。


在下文中一共展示了QtCore.__version__方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: check_versions

# 需要導入模塊: from PySide2 import QtCore [as 別名]
# 或者: from PySide2.QtCore import __version__ [as 別名]
def check_versions():
    print("[qt.py] CEF Python {ver}".format(ver=cef.__version__))
    print("[qt.py] Python {ver} {arch}".format(
        ver=platform.python_version(), arch=platform.architecture()[0]))
    print("[qt.py] PySide2 {v1} (qt {v2})".format(v1=PySide2.__version__,
                                                  v2=QtCore.__version__))
    # CEF Python version requirement
    assert cef.__version__ >= "55.4", "CEF Python v55.4+ required to run this" 
開發者ID:RimoChan,項目名稱:Librian,代碼行數:10,代碼來源:qtcef.py

示例2: pytest_report_header

# 需要導入模塊: from PySide2 import QtCore [as 別名]
# 或者: from PySide2.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 
開發者ID:birforce,項目名稱:vnpy_crypto,代碼行數:57,代碼來源:conftest.py


注:本文中的PySide2.QtCore.__version__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。