Qt demo

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


Blog Topics:

Comments