certqt
15th November 2010, 20:21
I am developing an application that is essentially a way of entering data into many SQL tables in a structured format.
The current layout consists of a QStackedWidget driven by a QListView which contains the tables within the database structure. There will be about 15 pages in the stacked widget.
On each QStackedWidget page is a QTabWidget, each tab of which contains a some of the fields from the table, or perhaps links to one of the other tables. Each tab widget has approx. 5 tabs with approx 10 fields per tab.
If I follow this approach, the result a QMainWindow with approximately 15 x 5 x 10 = 750 widgets + container widgets and labels. Whilst 1000+ widgets in a medium sized application is not unreasonable - having them all in one QMainWindow subclass seems a bit crazy!
My thoughts are to promote each tab to a QWidget subclass which provides all the functionality for that tab page. The problem is though that I like Qt Designer, but all the widgets are children of main window's ui.
I would welcome any comments on how best to structure this monster!
The current layout consists of a QStackedWidget driven by a QListView which contains the tables within the database structure. There will be about 15 pages in the stacked widget.
On each QStackedWidget page is a QTabWidget, each tab of which contains a some of the fields from the table, or perhaps links to one of the other tables. Each tab widget has approx. 5 tabs with approx 10 fields per tab.
If I follow this approach, the result a QMainWindow with approximately 15 x 5 x 10 = 750 widgets + container widgets and labels. Whilst 1000+ widgets in a medium sized application is not unreasonable - having them all in one QMainWindow subclass seems a bit crazy!
My thoughts are to promote each tab to a QWidget subclass which provides all the functionality for that tab page. The problem is though that I like Qt Designer, but all the widgets are children of main window's ui.
I would welcome any comments on how best to structure this monster!