[Qt-interest] RES: How to draw circle on top of a label
Leonardo Bispo
leonardo.bispo at corp.orolix.com
Thu Dec 18 20:44:22 CET 2008
Hi,
I don't know if it is what you want, but lets go:
QLabel is a QWidget and QWidget is a QPaintDevice, so you can use
a QPainter to draw in a QLabel.
QPainter has a method called
void QPainter::drawEllipse ( const QRectF & rectangle )
that you can use to draw a circle.
But if you want to make your widget a circle, you must need create a QRegion and then set the mask of QLabel.
QRegion has methods to make ellipse region, so this will be what you need.
Best Regards,
Leonardo Bispo de Oliveira
Desenvolvimento de Sistemas - Analista Desenvolvedor
Tel: +55 11 5508 5887, +55 11 2122 0312
Fax: +55 11 5508 5880
http://www.orolix.com.br - leonardo.bispo at corp.orolix.com
Orolix. Você NAVEGA, a gente PAGA !!!
-----Mensagem original-----
De: qt-interest-bounces at trolltech.com em nome de ARUN_KUMAR at denso-diam.com
Enviada: qui 18/12/2008 17:35
Para: Qt Interest; qt-interest-bounces at trolltech.com
Assunto: [Qt-interest] How to draw circle on top of a label
Hi all,
I am new to Qt?
Where I can view these postings on web? if i see under qt-interest mailing
list it is showing till october'2008.
How to draw circle on top of a label widget? Label widget is on
MainWindow. MainWindow is the central widget here.
Can you please give some code snippet,
Thanks & Regards,
Arun.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081218/c09fe343/attachment.html
More information about the Qt-interest-old
mailing list