Tuesday, March 24, 2009

Qt4 Drawing Notification Badges

Wow a Couple of Minutes of Free Time, and here two lines of code example to answer at Dave's question "How to Draw iPhone Like Notification Badges".

Badges are used olso in Mac OS X in application like iTunes and in the DockBar, check this post "Cocoa Notification Badge" to see how to use it with cocoa.

Obviously Notification Badges will be a features of My OpenMoko Apps.

The Example is very simple, there's a method that draws the badge with specified text and Brush, you can put the badge where you want not only on top left as showed in the picture :)

The Source Code is Available here: Qt Draw Badges Source Code.

1 comment:

  1. Typo in the link to the code. It's actually:
    http://th30z.netsons.org/wp-content/uploads/qtdrawbadges.zip

    ReplyDelete