[Qt-interest] Find main window from widget

Cole, Derek dcole at integrity-apps.com
Sat Jan 22 18:34:56 CET 2011


Hello,

If I have subclass a QGraphicsItem, and I want to send some information from the hoverMoveEvent back to a label that is in my main UI, how do I get that? Do I just loop over event.widget().parentWidget() until that returns zero, and then I can try to do a findChild<QLabel *>(labelName)?

I thought there would be an easy way to find another widget from within one, but its not popping out at me anyway.

I basically want a label to update with my pixel coordinates as I mouse over this QGraphicsItem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110122/c35d46fd/attachment.html 


More information about the Qt-interest-old mailing list