本文整理汇总了Python中PyQt4.QtGui.QSplashScreen方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QSplashScreen方法的具体用法?Python QtGui.QSplashScreen怎么用?Python QtGui.QSplashScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui
的用法示例。
在下文中一共展示了QtGui.QSplashScreen方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QSplashScreen [as 别名]
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_())
示例2: start_program
# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QSplashScreen [as 别名]
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_()
示例3: main
# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QSplashScreen [as 别名]
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