문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top