Question

The MainWindow class in GUI such as Qt applications is usually very large, including all the menus, toolbars, central widget, and other widgets and lots of member functions corresponding to all kinds of events and lots of other member convenience functions to do this or that.

Is there any good strategy to simplify the class?

Thanks a lot!

Jayden

Était-ce utile?

La solution

The same way you would break down any large component:

Abstract (break down) the functionality and responsibilities into subcomponents; repeat until a suitable level of granularity is achieved.

Without any specific details it's hard to be more precise.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top