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


Python QSplashScreen.setPixmap方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
class SplashScreen:
    def __init__(self, image_resource=":/images/splash_wait.png", text=None):
        pixmap = QPixmap(image_resource)
        self.splash = QSplashScreen(pixmap)
        self.splash.setMask(QRegion(pixmap.mask()));
        self.splash.setPixmap(pixmap);
        flags = self.splash.windowFlags()
        flags |= Qt.WindowStaysOnTopHint
        self.splash.setWindowFlags(flags)
        self._text = None
        if text is not None:
            self.setText(text)

    def show(self):
        self.splash.show()

    def hide(self):
        self.splash.hide()

    def setText(self, text):
        self._text = text
        self.splash.showMessage(text, Qt.AlignBottom | Qt.AlignHCenter);

    def getText(self):
        return self._text
开发者ID:maximerobin,项目名称:Ufwi,代码行数:27,代码来源:splash.py

示例2: setPixmap

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
    def setPixmap(self, pixmap):
        self.setAttribute(Qt.WA_TranslucentBackground,
                          pixmap.hasAlpha() and \
                          is_transparency_supported())

        self.__pixmap = pixmap

        QSplashScreen.setPixmap(self, pixmap)
        if pixmap.hasAlpha() and not is_transparency_supported():
            self.setMask(pixmap.createHeuristicMask())
开发者ID:675801717,项目名称:orange3,代码行数:12,代码来源:splashscreen.py

示例3: start_eas

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
def start_eas(host, client, app):
    multisite_client = MultisiteClient(host, client)

    # Add splash screen
    pixmap = QPixmap(":/images/splash_start.png")
    splash = QSplashScreen(pixmap)
    splash.setMask(QRegion(pixmap.mask()))
    splash.setPixmap(pixmap)
    splash.show()
    app.splash = splash
    splash.showMessage(tr("Loading application"), Qt.AlignBottom | Qt.AlignRight)
    app.processEvents()

    # Load the main window
    from console_edenwall import MainWindow

    window = MainWindow(app, multisite_client)
    window.show()
    splash.finish(window)
开发者ID:maximerobin,项目名称:Ufwi,代码行数:21,代码来源:start_eas.py


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