[Qt-interest] For creating arbitrary shapes of pushbutton

Luca Ottaviano lottaviano at develer.com
Wed Apr 1 14:55:10 CEST 2009


Il giorno mer, 01/04/2009 alle 09.18 +0530, Trinath Pujari ha scritto:
> Hi All,
> 
>         I want to create some arbitrary shapes of QpushButtons. So how we
> can create the pushButton with different shapes, please share me the
> information if anybody
>         knows how to do it.

You can re-implement QPushButton::showEvent() and draw a pixmap with
transparent background. That way you'll have a custom shaped button.
I've never used something else.

Best regards,
-- 
Ing. Luca Ottaviano - lottaviano at develer.com
Develer S.r.l. - http://www.develer.com/
.hardware .software .innovation
Tel.: +39 055 3986627 - ext.: 218




More information about the Qt-interest-old mailing list