[Qt-interest] QGraphicsWidget Drag&Drop
yifli at mtu.edu
yifli at mtu.edu
Fri May 7 14:40:52 CEST 2010
Hi folks,
I want to be able to drag around the 3D models displayed in a
QGraphicsView. Here's what I'm doing:
I use QGraphicsView to display a grid of 3D models(using OpenGL).
To do this, I add a QGraphicsWidget to QGraphicsScene so that the
QGraphicsWidget can hold my own QGraphicsLayout class
The QGraphicsLayout then holds my Viewer(derived from QGraphicsWidget),
which display a single 3D model.
I want to be able to drag a model in one Viewer to another. Here's what I
have tried:
create QDrag object when mouse button is hold and moved
Viewer->setAcceptDrops(true) and reimplement Viewer::dragEnterEvent
However, Viewer::dragEnterEvent is never called.
Can someone point me in the right direction? Thanks
Yifei
More information about the Qt-interest-old
mailing list