On 24-Feb-2014, at 3:45 PM, Tony Rietwyk wrote:
> Good luck - please let the group know what you decide with this.
I finally went with a timer:
void grafRec::doResizeEvent(QResizeEvent * event)
{
lastResizeRect.left = lastResizeRect.top = 0;
lastResizeRect.right = event->size().width();
lastResizeRect.bottom = event->size().height();
if (lastFullRedrawTime > SLOWDRAWINGGRAPHTIME)
{
if (_growTimer.isActive())
_growTimer.setInterval(SLOWGRAPHRESIZEWAIT);
else
_growTimer.start();
}
else
{
DoGrfGrow(this, &lastResizeRect);
DirtifyThisGraf(this);
}
}
void grafRec::_onGrowTimerTimedOut()
{
DoGrfGrow(this, &lastResizeRect);
DirtifyThisGraf(this);
}
If the graph took more than 0.2 seconds to draw the last time it was painted,
then the timer is set to time out in 0.2 s.
-John
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest