lundi 5 mars 2018

Qt applications how to structure not to have all slots in MainWindow

In my Qt applications I typically tend to write all slots within the MainWindow class.

I'm using many manipulation of QSliders, QTextEdits and lots of QFormLayouts whose values influence status of other widgets (QGLWidget typically), controlled from within my MainWindow.

I admit I hate to do connection manually on each and every object within specialized methods of my MainWindow, this results in more than 2000 lines of code but it is very practical as from MainWindow I can access the UI.

I cannot imagine large scale applications are relegating all the methods within the MainWindow.

Are there some hints from software engineering to structure Qt applications in some smarter way?

Aucun commentaire:

Enregistrer un commentaire