From 2841ac47dbd646539cc863a030be4a0ac6a077f4 Mon Sep 17 00:00:00 2001 From: Bjoern Erik Nilsen Date: Thu, 7 May 2009 13:08:45 +0200 Subject: Win: QLineEdit not updating correctly when embedded in Graphics View Updates triggered by the line edit itself, i.e. cursor blinking, are not processed after the top-level is resized. This is yet another problem caused by the event dispatcher on Windows (Qt posted events are not sent during top-level resize, task 146849). We added a work-around for that particular case by posting an event via Windows, but the widget is not visible on the screen (hidden from Windows' POV) so it'll never be posted. And of course then we'll never receive it and the backing store is not synced. This work-around is therefore useless for widgets that are not visible on the screen. However, not receiving update requests while resizing the top-level (in this case QGraphicsView), is not a problem for embedded widgets because all items and hence the proxied widgets are repainted by graphics view anyways. Task-number: 252400 Reviewed-by: Olivier --- src/gui/painting/qbackingstore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 8fb7a12..0a3a8dd 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -492,7 +492,8 @@ static inline void sendUpdateRequest(QWidget *widget, bool updateImmediately) return; #if defined(Q_WS_WIN) && !defined(Q_OS_WINCE) - if (QApplicationPrivate::inSizeMove && widget->internalWinId() && !updateImmediately) { + if (QApplicationPrivate::inSizeMove && widget->internalWinId() && !updateImmediately + && !widget->testAttribute(Qt::WA_DontShowOnScreen)) { // Tell Windows to send us a paint event if we're in WM_SIZE/WM_MOVE; posted events // are blocked until the mouse button is released. See task 146849. const QRegion rgn(qt_dirtyRegion(widget)); -- cgit v0.12