summaryrefslogtreecommitdiffstats
path: root/python/pyqt/examples3/SQL/runform1.py
blob: d5760ce19e0609593bd01d83b7a2839ea45c6b66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import sys
from qt import *

from form1 import Form1
from dbconnect import createConnection

class mainWindow(Form1):
    def __init__(self,parent = None,name = None,fl = 0):
        Form1.__init__(self,parent,name,fl)

if __name__ == "__main__":
    a = QApplication(sys.argv)
    if createConnection():
        QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
        w = mainWindow()
        a.setMainWidget(w)
        w.show()
        a.exec_loop()