本文整理汇总了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)
示例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_()
示例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)