Python PyQt4.QtGui.QSplashScreen() Examples
The following are 3
code examples of PyQt4.QtGui.QSplashScreen().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt4.QtGui
, or try the search function
.
Example #1
Source File: program.py From nupic.studio with GNU General Public License v2.0 | 6 votes |
def main(): Global.app = QtGui.QApplication(sys.argv) Global.app.setStyleSheet("QGroupBox { border: 1px solid gray; } QGroupBox::title { padding: 0 5px; }") Global.appPath = os.path.abspath(os.path.join(__file__, '..')) Global.loadConfig() Global.project = Project() Global.simulationForm = SimulationForm() Global.architectureForm = ArchitectureForm() Global.nodeInformationForm = NodeInformationForm() Global.outputForm = OutputForm() Global.mainForm = MainForm() # Create and display the splash screen start = time.time() splash_pix = QtGui.QPixmap(Global.appPath + '/images/splash.png') splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint) splash.setMask(splash_pix.mask()) splash.show() while time.time() - start < 3: time.sleep(0.001) Global.app.processEvents() splash.close() # Show start form startForm = StartForm() startForm.show() deploymentBuild = os.getenv("NUPIC_STUDIO_DEPLOYMENT_BUILD", False) if deploymentBuild: sys.exit(0) else: sys.exit(Global.app.exec_())
Example #2
Source File: telebix.py From Telebix with GNU General Public License v3.0 | 5 votes |
def start_program(): app = QtGui.QApplication(sys.argv) splash_pix = QtGui.QPixmap('resources/telebix_splash.png') splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint) splash.setWindowIcon(QtGui.QIcon('resources/icon.png')) splash.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.FramelessWindowHint) splash.setEnabled(False) Bar = QtGui.QProgressBar(splash) Bar.setMaximum(10) Bar.setGeometry(0, splash_pix.height() - 20, splash_pix.width(), 20) splash.show() for i in range(1, 11): Bar.setValue(i) t = time.time() while time.time() < t + 0.2: app.processEvents() splash.close() ui = jobs.App() ui.plot_conf() ui.init_button() ui.show() app.exec_()
Example #3
Source File: Application.py From eSim with GNU General Public License v3.0 | 5 votes |
def main(args): """ The splash screen opened at the starting of screen is performed by this function. """ print("Starting eSim......") app = QtGui.QApplication(args) splash_pix = QtGui.QPixmap('images/splash_screen_esim.png') splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint) splash.setMask(splash_pix.mask()) splash.show() appView = Application() appView.splash = splash appView.obj_workspace.returnWhetherClickedOrNot(appView) try: file = open(os.path.join( os.path.expanduser("~"), ".esim/workspace.txt"), 'r' ) work = int(file.read(1)) file.close() except IOError: work = 0 if work != 0: appView.obj_workspace.defaultWorkspace() else: appView.hide() appView.obj_workspace.show() sys.exit(app.exec_()) # Call main function