[Qt-jambi-interest] QtJambi: Exception pending in native code
Aekold Helbrass
helbrass at gmail.com
Wed May 20 16:59:46 CEST 2009
Eskil thanx alot! If I will se more such bugs - should I report them
using some bugtracker or should just mail you? And if bugtracker -
Jambi or Qt?
On Wed, May 20, 2009 at 2:59 PM, Eskil Abrahamsen Blomfeldt
<eblomfel at trolltech.com> wrote:
> Aekold Helbrass wrote:
>>
>> I got strange exception, sounds like "QtJambi: Exception pending in
>> native code in file
>> '..\cpp\com_trolltech_qt_gui\qtjambishell_QGraphicsRectItem.cpp':727"
>> and whole application hangs writing those lines for ever.
>>
>> Steps to reproduce - compile following code, run it (using Qt Jambi
>> 4.5.0 downloaded hour ago), and try to drag some rectangles outside of
>> the view. It's because view.fitInView(this); line, without it bug will
>> not be reproduced.
>>
>
> Hi,
>
> this is a bug in Qt causing the mouse event handler to be called recursively
> when it changes the transform of the view. To work around the bug, you could
> add a recursion guard inside your mouseMoveEvent() method.
>
> private boolean recursionGuard = false;
> public void mouseMoveEvent(QGraphicsSceneMouseEvent event) {
> if (recursionGuard) return ;
> recursionGuard = true;
>
> /* ... fitInView(this); ... */
>
> recursionGuard = false; }
>
> Hope this helps!
>
> -- Eskil
>
More information about the Qt-jambi-interest
mailing list