Source

python-hack-a-thon-1 / notepad / notepad.py

from PyQt4 import QtCore, QtGui, uic

(form, base) = uic.loadUiType("mainwindow.ui")

class NotePad(form, base):
    def __init__(self):
        super(NotePad, self).__init__()
        self.setupUi(self)


import sys
def main():
    app = QtGui.QApplication(sys.argv)
    win = NotePad()
    win.show()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()