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


Python PyQt5.__name__方法代碼示例

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


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

示例1: _setup

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = _import_sub_module(
                module, name)
        except ImportError:
            try:
                # For extra modules like sip and shiboken that may not be
                # children of the binding.
                submodule = __import__(name)
            except ImportError:
                continue

        setattr(Qt, "_" + name, submodule)

        if name not in extras:
            # Store reference to original binding,
            # but don't store speciality modules
            # such as uic or QtUiTools
            setattr(Qt, name, _new_module(name)) 
開發者ID:getavalon,項目名稱:core,代碼行數:26,代碼來源:Qt.py

示例2: _setup

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            continue

        setattr(Qt, "_" + name, submodule)

        if name not in extras:
            # Store reference to original binding,
            # but don't store speciality modules
            # such as uic or QtUiTools
            setattr(Qt, name, _new_module(name)) 
開發者ID:weijer,項目名稱:NukeToolSet,代碼行數:21,代碼來源:Qt.py

示例3: _setup

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            continue

        setattr(Qt, "_" + name, submodule)

        if name not in extras:
            # Store reference to original binding,
            # but don't store speciality modules
            # such as uic or QtUiTools
            setattr(Qt, name, _new_module(name)) 
開發者ID:TomMinor,項目名稱:P4VFX,代碼行數:23,代碼來源:Qt.py

示例4: _new_module

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _new_module(name):
    return types.ModuleType(__name__ + "." + name) 
開發者ID:getavalon,項目名稱:core,代碼行數:4,代碼來源:Qt.py

示例5: _import_sub_module

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _import_sub_module(module, name):
    """import_sub_module will mimic the function of importlib.import_module"""
    module = __import__(module.__name__ + "." + name)
    for level in name.split("."):
        module = getattr(module, level)
    return module 
開發者ID:getavalon,項目名稱:core,代碼行數:8,代碼來源:Qt.py

示例6: _pyqt5

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]
    try:
        import sip
        extras.append(sip.__name__)
    except ImportError:
        sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
開發者ID:getavalon,項目名稱:core,代碼行數:32,代碼來源:Qt.py

示例7: __repr__

# 需要導入模塊: import PyQt5 [as 別名]
# 或者: from PyQt5 import __name__ [as 別名]
def __repr__(self):
        return "<{}: {}>".format(self.__class__.__name__, self.__name) 
開發者ID:nilouco,項目名稱:dpAutoRigSystem,代碼行數:4,代碼來源:Qt.py


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