Richard Moe Gustavsen

Qt demo

Published Wednesday April 11th, 2007
13 Comments on Qt demo
Posted in Graphics View, Qt


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:

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Graphics View, Qt


Dan says:

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

Keep up the good work!

sunil.thaha says:

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

Jason says:

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

leejd says:

Very good!

Marius says:

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

Ralf says:

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?! ๐Ÿ˜‰

David says:

What about a actual executable for download?


richardmg says:

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 ๐Ÿ˜‰

Jason says:

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

richardmg says:

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

Kacper says:

Great Animations!

pierre says:

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

Commenting closed.

Get started today with Qt Download now