[Interest] Finished resizing a window?
Jason H
scorp1us at yahoo.com
Tue Feb 25 02:46:47 CET 2014
Also, note that the Qt event loop will collapse all pending resizes into one final one.
You should be able to block updating the layouts until the timer expires. Its been a while but you'll need to subclass the window and don't call the base class resizes until the timer is done.
I don't think the below will work, but like I said, it's been a whole for me working with widgets.
________________________________
From: Tony Rietwyk <tony at rightsoft.com.au>
To: interest at qt-project.org
Sent: Monday, February 24, 2014 6:45 PM
Subject: Re: [Interest] Finished resizing a window?
Hi John,
I would suggest a short single-shot timer roughly:
resizeEvent
base::resizeEvent
if !mTimer.isRunning
mTimer.start
paintEvent
if !mTimer.isRunning
base::paintEvent
timer slot:
repaint
I'm not sure whether overriding the paintEvent is enough to prevent the child widgets from painting.
Good luck - please let the group know what you decide with this.
Tony
From:interest-bounces+tony=rightsoft.com.au at qt-project.org [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of John Weeks
Sent: Tuesday, 25 February 2014 8:56 AM
To: Interest at qt-project.org Interest
Subject: [Interest] Finished resizing a window?
We have windows in our application that are potentially expensive to repaint, so when the user resizes a window we may need to put off repainting until the resizing is finished. It seems that we don't get mouse down/mouse up events when the user clicks in the window frame/resize grip area, so I can't wait until mouse up.
Is that correct?
Is there a solution to this?
Thanks!
-John Weeks
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140224/b233cdeb/attachment.html>
More information about the Interest
mailing list