I have a QPushButton with related icon, and I add it to a scene:
QPushButton *button = new QPushButton;
button->setIcon(QIcon(myIcon));
buttonWidget = detail->scene()->addWidget(button);
// buttonWidget is declared globally and is a QGraphicsProxyWidget*
Later on, in a different function, the buttonWidget
is still accessible. How can I retrieve the QPushButton
object from the buttonWidget
? I would like to change its icon.