我在PyQt4 GUI程序中显示启动画面有些问题。当我运行程序时,启动窗口不会显示。并且控制台不会显示任何错误。这是一些代码:
class MyWindow(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, None)
...
...
QtCore.QObject.connect(self.pbView,
QtCore.SIGNAL('clicked()'), lambda: self.view_plot(parent))
def view_plot(self, parent=None):
self.pic = QtGui.QPixmap("splash.gif")
self.splash = QtGui.QSplashScreen(parent, self.pic,
QtCore.Qt.WindowStaysOnTopHint)
self.splash.show()
...
self.splash.showMessage(u"Work completed in... {0} %".format(i),
QtCore.Qt.AlignCenter | QtCore.Qt.AlignBottom, QtCore.Qt.black)
...
self.splash.finish(parent)
请帮忙!
答案 0 :(得分:0)