Tuesday, July 31. 2007More aKademy PhotosNikolaj is busy uploading his aKademy photos. I liked this one: Foreground: Martin, Bart and Wendy Background: Me and Leinir In-between: Some guy Tuesday, July 31. 2007
Status of QGraphicScenes and Delegates Posted by Ian Monroe
in eean at
00:08
Comment (1) Trackbacks (0) Status of QGraphicScenes and DelegatesIn yesterday's blog I talked about my issue of wanting to use (animated) GraphicsView's in an Interview system for Amarok's playlist. Ivan ?uki? pointed me to a 2006 Trolltech Developer Days presentation about Advanced Item View. The presenter did show a pretty brute force way of doing animations in delegates, by just firing a timer every 40 ms. I tried this out two different ways. First was similar to how he did it, firing a timer. It was not to my great surprise that this resulted in 30% CPU time for just one row needing to be animated, and it went up from there as additional rows were added It actually still looked and reacted fine though, so before I noticed the CPU usage I was feeling like I had cracked the case. Then I tried it by connecting (indirectly, since I had to translate a QGraphicsScene into a QModelIndex) QGraphicsScene::sceneRectChanged to QAbstractItemView::update. However this didn't work. Apparently QGraphicsScene doesn't consider a flashing cursor as a scene change worth mentioning? So now I'm basically back to where I was. Except the presentation did hold out another possibility of subclassing QAbstractItemView and then doing setViewport. This is what he did for the QGLWidget views that he made (instead of just writing a view from scratch). However its not quite clear to me what the QAbstractItemView provides when you override the viewport. More importantly none of the examples had scrolling, so they just painted the whole area all the time. And figuring that out is the biggest issue with perhaps using a QGraphicsView (whether by itself or as a viewport of a QAbstractItemView.) More Playlist Details Benjamin Meyer had a few questions about the playlist that I'll address here: |
Amarok LinksCalendarQuicksearchCategoriesSyndicate This BlogBlog Administration |

