Вопрос

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