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)
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_()
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_()
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)