Forgot the list... ---------- Forwarded message ---------- From: Helge Fredriksen <[email protected]> Date: Wed, Oct 27, 2010 at 2:02 PM Subject: Re: [Qt-jambi-interest] Qt-jambi-interest Digest, Vol 33, Issue 21 To: Zhongmiao Li <[email protected]>
Hello! Never really used QGraphicsProxyWidget myself, but I know there were some changes in how to approach the embedding of widgets as items in a QGraphcisScene from 4.5 to 4.6. What version are you using? Also, I see from the documentation that the usual way to add such widgets are using the addWidget() method http://doc.trolltech.com/qtjambi-4.5.2_01/com/trolltech/qt/gui/QGraphicsProxyWidget.html ? Regards, Helge Fredriksen On Wed, Oct 27, 2010 at 11:51 AM, Zhongmiao Li <[email protected]> wrote: > Hello! > > I stuck in a strange error. Hope you could help me to solve it, thanks in > advance! > > I use QGraphicsScene.addItem() to add a QGraphicsProxyWidget as an Item, > and it succeeded. > > However, when I use itemAt(pos) to get the item, since the returned item > is of type QGraphicsItemInterface, so in order to use it > as QGraphicsProxyWidget , I did a cast from QGraphicsItemInterface to > QGraphicsProxyWidget, > but then there was a ClassCastException thrown. > > So how can I get this item as type of QGraphicsProxyWidget? Thank you!! > > _______________________________________________ > Qt-jambi-interest mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest > >
_______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
