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


Python QSplashScreen.repaint方法代码示例

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


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

示例1: show

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import repaint [as 别名]
def show():
    
    message = "{0}  {1} ".format(appinfo.appname, appinfo.version)
    pixmap = QPixmap(os.path.join(__path__[0], 'splash.png'))
    if QApplication.desktop().screenGeometry().height() < 640:
        fontsize = 23
        pixmap = pixmap.scaledToHeight(240, Qt.SmoothTransformation)
    else:
        fontsize = 40

    splash = QSplashScreen(pixmap, Qt.SplashScreen)

    font = splash.font()
    font.setPixelSize(fontsize)
    font.setWeight(QFont.Bold)
    splash.setFont(font)

    splash.showMessage(message, Qt.AlignRight | Qt.AlignTop, Qt.white)
    splash.show()
    splash.repaint()
    
    def hide():
        splash.deleteLater()
        app.appStarted.disconnect(hide)

    app.appStarted.connect(hide)
开发者ID:EdwardBetts,项目名称:frescobaldi,代码行数:28,代码来源:__init__.py

示例2: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import repaint [as 别名]
def main(argv):
    """The main function."""

    wavy = QApplication(argv)
    wavy.setStyle('Cleanlooks')
    wavy.setApplicationVersion(__version__)
    wavy.setApplicationName(__app_name__)
    wavy.setOrganizationName("Sao Carlos Institute of Physics - University of Sao Paulo")
    wavy.setOrganizationDomain("www.ifsc.usp.br")

    pixmap = QPixmap("images/symbol.png")
    splash = QSplashScreen(pixmap)
    splash.show()
    splash.repaint()
    splash.showMessage("Loading...")
    wavy.processEvents()
    splash.showMessage("Starting...")
    wavy.processEvents()
    window = MainWindow()
    window.showMaximized()
    time.sleep(0)
    splash.finish(window)
    return wavy.exec_()
开发者ID:MatheusLuccas,项目名称:wavy,代码行数:25,代码来源:gui_wavy.py

示例3: QLatin1String

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import repaint [as 别名]
    app = QtGui.QApplication(sys.argv)
    #http://tech-artists.org/forum/showthread.php?p=14479
    #app.setPalette(QPalette(QColor(255,50,50)))
    app.setStyle("plastique")
    
    file=QFile(":/images/darkblue.stylesheet");
    file.open(QFile.ReadOnly);
    styleSheet = QLatin1String(file.readAll());
    app.setStyleSheet(styleSheet);    
    
    #app.setStyleSheet(stylesheet.dark)
    
    pixmap=QPixmap.fromImage(QImage(":/images/splash.png")) 
    splash=QSplashScreen(pixmap)
    splash.show()
    splash.repaint()
    
    

    # Load the plugins from the plugin directory.
    manager = PluginManager()
    manager.setPluginPlaces(["plugins"])
    manager.collectPlugins()

    # Loop round the plugins and print their names.
    for plugin in manager.getAllPlugins():
        plugin.plugin_object.print_name()  
        #splash.showMessage("ioyoy")
        #time.sleep(1)
    
    
开发者ID:jromang,项目名称:retina-old,代码行数:31,代码来源:retina.py


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