I have a problem displaying a splash screen under linux. The code above
works perfecly under windows from either a IDE or a command line. But
under linux, the code above will display the splash screen perfecly when
it is run from the IDE (netbeans). But when it is lunched from a shell,
it does not display any splash screen but the app start after

Is there something special needed when lauched from a shell??



\
import sys,time
from PyQt4 import QtCore , QtGui

from ui.MainWindow import MainWindow

def main():

        app = QtGui.QApplication(sys.argv)
        app.setStyle(QtGui.QStyleFactory.create("plastique"))
        
        
        splash_pix = QtGui.QPixmap('splash.png')
        splash = QtGui.QSplashScreen(splash_pix,
        QtCore.Qt.WindowStaysOnTopHint)
        splash.setMask(splash_pix.mask())
        splash.show()
        app.processEvents()


        time.sleep(2)

        
        mw = MainWindow()
        splash.finish(mw)

        mw.show()

        app.exec_()

if __name__ == '__main__':
    main()
 


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  [email protected]

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to