[Qt-interest] Repaint Problem/BUG with QLineEdit in QGraphicsScene

Mihail Naydenov mlists at ymail.com
Sun Mar 22 18:03:53 CET 2009




----- Original Message ----
From: Mihail Naydenov <mlists at ymail.com>
To: qt-interest at trolltech.com
Sent: Friday, March 20, 2009 2:19:26 PM
Subject: [Qt-interest] Repaint Problem/BUG with QLineEdit in QGraphicsScene


Hi,

Right now if you resize the main window while QLineEdit (placed in QGraphicsScene) has focus, the widget will stop handling repaint upon user interaction. If the widget is a group, and QLineEdit  is part of it, all widgets within the group will stop update themselfs. They do handle the events however, but one must resize the win again to force a redraw.
A "workaround" is to remove the focus (tab to other widget, click ouside etc) from QLineEdit before editing the window frame.

Note that the problem is also visible in the Embedded Dialogs Demonstration (where it is the editable combobox, not lineedit, that is causing the problem) -  just start typing in Select font, then, without pointing to any other dialog, move the mouse to the win frame and resize it. Now if you try to continue typing, there will be no feedback, if try to carefully select the font selector combobox again and try to type again - it will still have no effect! You have to select the font from the dropdown menu or select some other control in order to restore the updates.

Is it a bug, and is there a way to fix/workaround this?
Thank you
MihailNaydenov



Any comments on that?

The problem is more nasty than it sounds, first, because it affects all QLineEdit-related widgets - QDateTimeEdit, QSpinBox, QDoubleSpinBox, etc, and second I have not found a way to restore painting, once disabled, making those widgets almost useless in QGraphicsScene! The problem also occurs from simply moving the window.

I tried subclassing a QLineEdit and handle event(), listening for QEvent::NonClientAreaMousePress to clear the focus before moving/resizing but this did not work. The even is never recieved (QEvent::NonClientAreaMouseMove also)...maybe these must activated, or something...?

I also search the task tracker, and there is no open bugs for that.
Should I open one?
Thank You
MihailNjdenov

PS Using Vista 32, with and without window composition

      

_______________________________________________
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