Richard Moe Gustavsen
Qt
Graphics View
 in Qt, Graphics View
 on Wednesday, April 11, 2007 @ 13:17

Hi!

For a while now I’ve been working on a new Qt demo. Conceptually the new demo works the same way as before; it presents you with a menu of demos and examples on how to build applications using Qt. The new version makes use of QGraphicsView, a faster and better component for dealing with graphics, that supports hardware accelerated rendering whenever possible, and software rendering if not. The new demo is scheduled for Qt 4.3.

It has really been fun writing this thing. It started out with a lightweight ’system’ for creating buttons using simple animations, and ended up with a small beast that haunts me at night. I still can’t get my hands off fixing and twiddling with the ticker transitioning stuff…

A new feature of the demo (compared to the old version) is that it adapts according to the environment. If run on a moderate computer with an old graphics card, chances are that most of the ‘fancy’ stuff will be hidden. This includes the green ticker (see the screenshot below) and animations/transitions for moving buttons and example content in and out from the screen. And if your desktop supports less then 16 bit colors, transparency will be replaced with opaque colors.

The adaption mechanism is performed in two passes; First, before anything shows up on screen, a static test is done to check the underlying hardware. If the test reports bad news, the demo will run in a low setting with no animations and alike. Otherwise, it starts up as normal, and uses the first seconds to perform a benchmark in the background. If the measured frames per second (FPS) is low, the ticker, and perhaps transitions/animations, will be skipped. All animations are written using QTimeline (except the ticker), which makes it easy to ensure that the ’speed’ of the animations will remain the same regardless of the FPS.

Adaption, and a lot of other things, are also controllable from the command line.

UPDATE: Here is a little movie that shows how it works!

…and a screenshot:
demo1.png

13 Responses to “Qt demo”

» Posted by Dan
 on Wednesday, April 11, 2007 @ 15:10

This really looks good.
I am really looking forward to test it out.

Keep up the good work!

» Posted by sunil.thaha
 on Thursday, April 12, 2007 @ 07:13

That is Awesome. Wonderful work. ..
But would you want to vertical align the quit button with the other set of buttons on top ?

» Posted by Jason
 on Thursday, April 12, 2007 @ 16:35

A statically compiled version (win32) would be awesome.. cough*hint*cough

» Posted by leejd
 on Friday, April 13, 2007 @ 02:55

Very good!

» Posted by Marius
 on Friday, April 13, 2007 @ 07:45

If you haven’t seen the update that Richard did to the post, he added a link to show off the new wonder.

» Posted by Ralf
 on Friday, April 13, 2007 @ 14:38

Looking at this, I get an idea, which I like even better, the more I think about it: Wouldn’t it be possible to replace the (ugly - sorry guys) PieMenu from the Qt Solutions by something based on QGraphicsView?!
This way, you could have appealing animations and lots of new possibilities for user interaction.
What about it? Richard?! Zack?! ;-)

» Posted by David
 on Friday, April 13, 2007 @ 15:26

What about a actual executable for download?

» Posted by Albeiro Caicedo
 on Saturday, April 14, 2007 @ 00:46

FANTASTIC, YOU’RE NOW A MONSTER OF QT, YOU ONLY NEED THE HORNS TO BE A DEMON OF IT

» Posted by richardmg
 on Monday, April 16, 2007 @ 09:22
Richard Moe Gustavsen

Thanks for all comments.
An executable for download is a great idea. The main obstacle for doing this, however, is that the demo picks out the text it uses from the Qt documentation at runtime. In addition, it is supposed to work together with examples and demos found in Qt (after all, it’s a launcher app). With these issues in mind, and the fact that 4.3 is just around the corner (sometime in may…), we have decided to skip the static build.
But from all the other feedback, and with some artistic help from Jens, the look and feel will actually change quite a bit from the screenshot and movie above (it will be a bit darker and cooler)… I hope you all will like the new look as well ;)

» Posted by Jason
 on Wednesday, April 18, 2007 @ 18:05

define “sometime in may”.
May week 1?
May week 2?
May week 3?
May week 4?
I have a project that would really benefit from this, but it is due June 1

» Posted by richardmg
 on Thursday, April 19, 2007 @ 14:18
Richard Moe Gustavsen

The release date is not decided upon yet. Most likely it will be more towards the end of may.

» Posted by Kacper
 on Monday, April 23, 2007 @ 09:48

Great Animations!

» Posted by pierre
 on Monday, April 30, 2007 @ 18:47

Very nice. It will be nice to see qt4 soon. Hope it will be more high-level than qt3 and gtk2



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.