I'm just starting out with QT, and my programming experience is heavily algorithm-based (machine vision research) rather than application/interface work.
I'm looking at designing an interface for an image processing robotic application. The main window is fine, but I want other windows as well (for example, for tweaking image processing parameters and robot communication testing. Based on searching around, I figured a QStackedWidget would handle this fine, and from a UI-design perspective it certainly does.
However, I find that my app.cpp (and to a lesser extent app.h) file is getting pretty large with many functions (affecting readability). I'd like to split it up, and would like advise on the advantages/disadvantages of the methods I'm thinking about.
1. I could maintain the current large app.cpp but preface functions with page1_ or page2_ (and group all functions for a page together) so I'd know where to look for stuff.
2. I could design multiple forms (.ui files) and put one in each page of the stacked widget. Actually, can I? I'm 75% sure I can, but please correct me if I'm wrong on this.
3. I could leave the form as-is but create one class per page (not a QWidget class) which is responsible only for the widgets in that page. This seems identical to 1 except for the physical location of the code, not improving any separability/reusability at all. [1] seems to talk a bit about this.
If there's any options I could use instead, please do suggest them. Main caveat is I'm pretty sure I prefer to design the UI in Designer rather than in code just so I can see what is placed relative to other things.
Thanks for your time.
[1] - http://www.qtcentre.org/threads/5015...n-window-class
Bookmarks