一、代码实现 实现代码示例 MainWindow2 w; QGraphicsScene *scene = new QGraphicsScene; QGraphicsProxyWidget *gw = scene->addWidget(&w); // 旋转角度 gw->setRotation(90)