Я пытаюсь выполнить некоторые анимации с помощью QGraphicsProxyWidget, но не вижу, чтобы какое-либо приложение было применено. Например, если я хочу, чтобы просто повернуть QGraphicsTextItem этот код работает:анимации QGraphicsProxyWidget не работают
QGraphicsView *view_ = new QGraphicsView(this);
QGraphicsScene *scene_ = new QGraphicsScene(view);
QGraphicsTextItem *text_item_ = new QGraphicsTextItem("This is some sample text to\ntest if we can rotate the\nimage correctly");
scene_->addItem(text_item_);
text_item_->rotate(180);
view->setScene(scene_);
Однако это не на самом деле, кажется, сделать что-нибудь:
QLabel* label = new QLabel(this);
label->setText("This is some sample text to\ntest if we can rotate the\nimage correctly");
QGraphicsView *view_ = new QGraphicsView(this);
QGraphicsScene *scene_ = new QGraphicsScene(view);
QGraphicsProxyWidget *proxy_widget_ = new QGraphicsProxyWidget();
proxy_widget_->setWidget(label);
scene_->addItem(proxy_widget__);
proxy_widget_->rotate(180);
view->setScene(scene_);
также не делает это так:
QGraphicsProxyWidget *proxy_widget_ = scene_->addWidget(label).
Любые предложения?