在QGraphicsWidget下的布局设计,对于Qt的设计思想感觉很“特别”。QGraphicsWidget是LayoutItem——也就是说它本身就应该具备布局功能,QGraphicsLayout也是LayoutItem;要实现布局管理,却要在QGraphicsWidget中SetLayout。如何QGraphicsWidget具备QGraphicsLinearLayout(QGraphicsLayoutItem的派生类)的属性?
------解决方案--------------------
二者的应用范围不一样的,QGraphicsWidget和QWidget相关。