[Qt-interest] Non-blocking windows drag-n-drop
Aron Bierbaum
aronbierbaum at gmail.com
Mon Aug 31 18:41:28 CEST 2009
I finally got back to looking into my problem and it appears that it
is because my application is manually processing events. Since my
application is updating a scene graph that is being rendered in a
QGraphicsScene once I start dragging, my application loop freezes, but
Qt does continue to pump events. For example my application would do
the following:
while running:
updateSceneGraph()
app.processEvents()
The issue that I am seeing is that once a drag starts I don't get any
calls into updateSceneGraph(). I guess that is what I get for manually
pumping the Qt event loop. My only other idea would be to create a
QTimer() temporarily to call back into my application. :(
Thanks,
Aron
On Fri, Aug 21, 2009 at 12:39 AM, Ross
Bencina<rossb-lists at audiomulch.com> wrote:
> Hi Aron
>
> I agree the documentation looks like a problem but I'm doing drag-n-drop
> into a QGraphicsView on Windows using QDrag::exec() and there is no problem
> with updating/redrawing QGraphicsItems while dragging. Also I have other
> QTimer based animation in my QGraphicsView which updates while dragging. I'm
> still using 4.4.3 so perhaps this has changed in 4.5?
>
> Perhaps the cause of your problems is not QDrag at all? Does your code work
> ok on other platforms?
>
> Ross.
>
>
> ----- Original Message ----- From: "Aron Bierbaum" <aronbierbaum at gmail.com>
> To: <qt-interest at trolltech.com>
> Sent: Friday, August 21, 2009 9:19 AM
> Subject: [Qt-interest] Non-blocking windows drag-n-drop
>
>
>> It appears that there is a limitation on Windows where all drag-n-drop
>> operations in Qt are blocking. [1] Is there any known way to get
>> around this? I would like to update the target QGraphicsItem when
>> hovering over it. This does not seem to work because the widgets are
>> not getting rendered. Any ideas on how to work around this?
>>
>> Thanks,
>> Aron
>>
>>
>> [1] http://doc.trolltech.com/4.5/qdrag.html#exec
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list