def __init__(self, img): splash_pix = QPixmap(img) self.splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint) self.splash.setMask(splash_pix.mask()) self.splash.show() for i in range(100): time.sleep(0.01) QApplication.processEvents()
class HrpsysSplashScreen: def __init__(self, img): splash_pix = QPixmap(img) self.splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint) self.splash.setMask(splash_pix.mask()) self.splash.show() QApplication.processEvents() def kill(self): self.splash.close()