Qt Multiple Toplevels - Best Practice Question

Post here if you need help with creating a Graphical User Interface in Python.

Qt Multiple Toplevels - Best Practice Question

Postby TheFunk » Thu Sep 19, 2013 12:38 pm

I just finished writing a simple program with multiple top level windows, using Qt. In my script, windows open other windows by calling functions stored in the other windows file. For example, if I were on Window 1 and I clicked on a menu item that was supposed to bring up Window 2, my click would signal a slot that calls the run() function from Window 2, and Window 2 would run, and the two windows would live happily ever after.

There's no way that's best practice. I feel like I should have one 'driver' script, which would have specific functions that could be called every time a new window needs opened. Is that feasible? Is that a better idea? What's best practice in this case?
TheFunk
 
Posts: 27
Joined: Fri Aug 30, 2013 5:46 pm

Return to GUI

Who is online

Users browsing this forum: Yoriz and 1 guest