I'm working with python + pyqt + all this stuff for a couple of months, and now, I have some important questions (for me) about the way I do my programs.
I use several windows which usually I design with qtdesigner and convert to python code with the pyuic: "pyuic -o codeqt.py codeqt.ui". All works ok but due to the size of the project I'm working now (more precisely the size it will have once I have finished ; )) I trying to do thing with order and "fine".
I will use an example: I have 2 windows (QWidgets / QDialogs is another thing that I don't know if I 'm using well). Anyway the name of the files will be file1qt.py and file2qt.py. And the name of the form, and then the name of the classes are widget1 and widget2.
I used to leave these files as it to be make modifications with the qtdesigner and do not destroy my changes in the code (is it correct??)
In the mainprogram "main.py" I start like this:
import sys
from qt import *
from file1qt import *
from file2qt import *
...
...
def f1():
...
...
...
a = QApplication(sys.argv)
w1=widget1()
w2=widget2()
w1.connect(w1.somewidget1, SIGNAL("clicked()"), somefunction)
w1.connect(w1.anotherwidget1, SIGNAL("clicked()"), anotherfunction)
w2.connect(w2.somewidget1, SIGNAL("clicked()"), somefunction2)
w2.connect(w2.anotherwidget1, SIGNAL("clicked()"), anotherfunction2)
w1.show()
a.connect(a, SIGNAL('lastWindowClosed()'), exit_program)
a.exec_loop()
My questions:
I hope I have been clear in my explanations
Thank you all very much in advance.
_______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
