View Full Version : Qlabel with (icon and text) HowTo ?
QiT
7th August 2006, 14:50
hi all :)
how can i make a qlabel containing a text and an icon in the same time. I know that you can make one of them but what about twice.:confused:
thanks
Chicken Blood Machine
7th August 2006, 21:28
Two ways:
1. Just use two QLabels next to each other in a QVBoxLayout
2. Use rich text for the label, e.g:
lbl->setTextFormat(Qt::RichText);
lbl->setText("<img src=":/myimage.png">Hello!");
You will need to have a resource collection set up that contains your image for (2).
QiT
8th August 2006, 08:14
thanks nice solutions :D
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.