[Qt-interest] How can I set text with icons in a QGroupBox?
Malyushytsky, Alex
alex at wai.com
Thu Nov 5 03:49:48 CET 2009
I don't think QT supports it with any QStyle.
And I don't know any available QGroupBox based widget which does it.
But if you really want it you can subclass QGroupBox and add additional QIcon property (or even use windowIcon to store it).
Then override virtual void paintEvent(QPaintEvent *);
And draw QIcon the way you like.
It might be not that easy to define suitable rules though.
Remember that QGroupBox might display checkbox.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Pedro Santos
Sent: Wednesday, November 04, 2009 4:37 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] How can I set text with icons in a QGroupBox?
Hallo,
I would like to know how to set an icon ajacent to the text
in a QGroupBox like this:
http://www.codeproject.com/KB/miscctrl/ImageGroupBox.aspx
I think its possible with QStyle but I'm not familare with this, can someone
give me an example?
Greetings
Pedro Santos
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list