Hello everybody,
I wonder how to layout the classes for a Qt program. I am using the designer for generating the *.ui and the ui_mainwindow.h.
Main instantiates an mainwindow object from a MainWindow class, which calls the setupUi method of the ui_mainwindow.h in its constructor. So far it is standard, I guess.
I thought, it is a good idea, to have several GUI related helper classes that can execute some special tasks, like plotting different types of graphs or adjust the controll widgets to the current user-operations... Is that recommended or should I do all that stuff in the MainWindow class?
If I use these helper classes, they need to have access to the widget objects instantiated in the setupUi method. How can I do this?
At the moment I am justing handing over a pointer of the widget to the helper class so I can manipulate that widget in the helper class.
But I can imagine that this can become very tedious if the program is growing more complex.
So, how can I, and this is the most important question to me, inherit the MainWindow or ui_MainWindow classes with the helper classes, so that the widgets instantiated in setupUi are accessible in the helper classes?
I am happy about every hint![]()
greetz, kai
Bookmarks