def showSplash(splashImageName): """ Function which shows a nice splash screen. @param splashImageName: Name of the splash screen image. @type splashImageName: C{unicode} """ screen = QApplication.desktop().screenGeometry() if not _haveImagesAsModule: addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH) dfPicture = QPixmap.fromMimeSource(splashImageName) dfSplash = QLabel(None, "splash", Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\ Qt.WX11BypassWM | Qt.WStyle_StaysOnTop) dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised) dfSplash.setPixmap(dfPicture) dfSplash.setCaption("DataFinder") dfSplash.setAutoResize(1) dfSplash.move( QPoint(screen.center().x() - dfSplash.width() / 2, screen.center().y() - dfSplash.height() / 2)) dfSplash.show() dfSplash.repaint(0) QApplication.flush() return dfSplash
def showSplash(splashImageName): """ Function which shows a nice splash screen. @param splashImageName: Name of the splash screen image. @type splashImageName: C{unicode} """ screen = QApplication.desktop().screenGeometry() if not _haveImagesAsModule: addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH) dfPicture = QPixmap.fromMimeSource(splashImageName) dfSplash = QLabel(None, "splash", Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\ Qt.WX11BypassWM | Qt.WStyle_StaysOnTop) dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised) dfSplash.setPixmap(dfPicture) dfSplash.setCaption("DataFinder") dfSplash.setAutoResize(1) dfSplash.move(QPoint(screen.center().x() - dfSplash.width() / 2, screen.center().y() - dfSplash.height() / 2)) dfSplash.show() dfSplash.repaint(0) QApplication.flush() return dfSplash