diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-06-10 09:37:53 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-06-11 03:14:08 (GMT) |
commit | 968489cf5cf07443deb3aabd20707d01019cadfa (patch) | |
tree | e6531cc4a5380ced870a45723c7832adacaa77a8 | |
parent | 30ce32c07744dbc95d8e2592543ebf91ffa037ad (diff) | |
download | Qt-968489cf5cf07443deb3aabd20707d01019cadfa.zip Qt-968489cf5cf07443deb3aabd20707d01019cadfa.tar.gz Qt-968489cf5cf07443deb3aabd20707d01019cadfa.tar.bz2 |
BT: QtDemo works far to sluggish on mac
Basically we need to revert more of Oliviers change. The reason
is that we just cannot run the demo on mac without timer based
updates (as opposed to graphics view itself tries to figure out
when to update). The reason is that the demo uses QItemAnimations
extensivelly, which again uses QTimelines, wich again uses
separate timers. And on mac, because of coalesced updated, each
item animation will result in an individual redrawing of the scene.
Task-number: 255751
Reviewed-by: Olivier
(cherry picked from commit 7886888d3e873500dd1ea7d3f450f7d7f87c0ea6)
-rw-r--r-- | demos/qtdemo/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp index 029af0e..3366d45 100644 --- a/demos/qtdemo/mainwindow.cpp +++ b/demos/qtdemo/mainwindow.cpp @@ -190,6 +190,7 @@ void MainWindow::switchTimerOnOff(bool on) if (on && !Colors::noTimerUpdate){ this->useTimer = true; + this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate); this->fpsTime = QTime::currentTime(); this->updateTimer.start(int(1000 / Colors::fps)); } @@ -261,6 +262,7 @@ void MainWindow::tick() if (MenuManager::instance()->ticker) MenuManager::instance()->ticker->tick(); + this->viewport()->update(); if (this->useTimer) this->updateTimer.start(int(1000 / Colors::fps)); } |