From 7886888d3e873500dd1ea7d3f450f7d7f87c0ea6 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 10 Jun 2009 11:37:53 +0200 Subject: 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 --- demos/qtdemo/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demos/qtdemo') diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp index 8055fec770..bfffba5069 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)); } -- cgit v1.2.3