Sunday, 11 August 2013

Starting with Python GUI

Well , after having several thoughts I thought of going ahead with Python GUI.
I am thinking of building a emailing app.Well I wrote a code which gave me a splash screen and a main window.Here Goes the image.
Here's the code I used to do it.
from PyQt4 import Qt, QtCore, QtGui
from PyQt4.QtGui import *
import sys
import time
class firstApp:
    def __init__(self):
        super(firstApp, self).__init__()
        self.initUI()


if __name__ == '__main__':
    app = QApplication(sys.argv)
    pixmap = QPixmap("images/splash.png")
    splash = QSplashScreen(pixmap)
    splash.setMask(pixmap.mask())
    splash.show()
    w = QtGui.QWidget()
    w.resize(250, 150)
    w.move(300, 300)
    w.setWindowTitle('Simple')
    w.show()
    sys.exit(app.exec_())



Well that done the next step is to remove the splash screen before the main window opens.
MISSION Continues.
cheers.

No comments:

Post a Comment