How can i change a form with Qgraphicsproxywidget ?
Hi at all,
I have used a Qgraphicproxywidget to add a form into a scene, but the problem is how can i have access to the gui form and how can i edit the elements during the runtime.
My code is this one :
proxy = new CustomProxy(0, Qt::Widget); proxy->setWidget(new Form); scene->addItem(proxy);
And the Form is a Qt designer form Class. I have a pushbutton and a QLabel, and i want to put some live data on the QLabel from a databank. How can i have access to this Gui form ?
Keep a pointer to the Form you set on the proxy, then connect what you need to update its label.
Hope it helps
Thank you, could you be more clear, could you give me an example ?
proxy = new CustomProxy(0, Qt::Widget); Form *newForm = new Form; proxy->setWidget(newForm); scene->addItem(proxy); newForm->doSomethingCool();