[Qt-interest] How to draw circle on top of a label
Benjamin
ikipou at gmail.com
Wed Dec 10 07:37:59 CET 2008
Hi,
You can subclass QLabel and override paintEvent. An example:
void Widget::paintEvent(QPaintEvent * event){
QLabel::paintEvent(event);
QPainter painter(this);
painter.drawEllipse(QPoint(5,5), 5, 5);
}
If you are trying to make a bullet in front of the text, you can do it
simply by using HTML in the text of the label:
setText("<ul><li>That's it!</li><li>Qt is fun</li></ul>");
regards,
Benjamin
2008/12/10 <ARUN_KUMAR at denso-diam.com>
>
> Hi all,
>
> I am new to Qt?
> How to draw circle on top of a label widget?
> Can you please give some code snippet,
>
> Thanks & Regards,
> Arun.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081210/83077109/attachment.html
More information about the Qt-interest-old
mailing list