[Qt-interest] drop indicator on QGraphicsScene
Xinyi Li
lixinyi.qt at gmail.com
Wed Aug 12 11:10:40 CEST 2009
thank you for your response Christopher
But I did try QGraphicsView.setAcceptDrops(true)
it didn't work the way I expected.
the mouse keep showing a Block indicator while drag moving
QGraphicsView view1(&scene);
view1.setRenderHint(QPainter::Antialiasing);
view1.setCacheMode( QGraphicsView::CacheBackground );
view1
.setViewportUpdateMode( QGraphicsView::BoundingRectViewportUpdate );
view1.setWindowTitle( QT_TRANSLATE_NOOP(QGraphicsView,"Lab Car") );
view1.setDragMode(QGraphicsView::RubberBandDrag);
view1.setAcceptDrops(true);
Now any other ideas?
On Aug 12, 2009, at 5:18 PM, Christopher Rasch-Olsen Raa wrote:
> On Wednesday 12 August 2009 10:17:45 Xinyi Li wrote:
>> Dear list
>>
>> I want to perform a Drag & Drop over a QGraphicsScene and I would
>> like
>> to draw an indicator (the same place as mouse) during the drag-and-
>> drop operation
>>
>> But I found that setAcceptDrops(bool) doesn't work for
>> QGraphicsScene.
>> what should I do? Pls help me.
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> The view supports drag / drop so the view is where you'd like to
> catch that
> event. Hope that helps.
>
> --
> Christopher
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090812/62c01283/attachment.html
More information about the Qt-interest-old
mailing list