[Qt-interest] Images in a QComboBox

Malyushytsky, Alex alex at wai.com
Fri Mar 13 23:03:24 CET 2009


You might just fill it with QIcon, and omit text if needed:
void QComboBox::insertItem ( int index, const QIcon & icon, const QString & text, const QVariant & userData = QVariant() )

Be aware, that you might need to set appropriate  icon size, or it might not to be shown:
        QComboBox::setIconSize( QSize(width,pheight) );

Hope this helps,
   Alex Malyushytsky



-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of luper rouch
Sent: Friday, March 13, 2009 9:53 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Images in a QComboBox

Hi,

How could I make a combo box containing a list of images ? The images
must not be scaled or anything, I would like to see them unmodified.

Thanks
_______________________________________________
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