Backlit effect

Qt has always the power to render sleek graphic effects. This blog post describes a simple trick to render back light effect for any windows and graphic items. In short, back light effect shows ambient lighting effect behind any graphic element irrespective of its shape and size.

Back light behind a standard dialog

The trick is pretty simple. We use a QGraphicsEllipseItem for the back light. This ellipse takes the rect of the the dialog/window/graphics item which stays on top. To render the effect we use a QGraphicsBlurEffect on ellipse and add it to scene. Note that we have to place it behind the dialog in z order.

    QGraphicsEllipseItem backLight;
    QGraphicsBlurEffect blurEffect;

Find the complete source at

Opps! did I mention it needs Qt 4.6 or newer to build. Never make the dialogs boring anymore!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s