Seite 1 von 1

[Qt3] QListBoxItem, als QPixmap in QListBox darstellen?

Verfasst: 10. September 2005 20:00
von jaipur
hallo,

in QListBoxItem ist die member funktion paint virtual und wenn
ich nun die items in der QListBox als QPixmap darstellen möchte
muss ich diese funktion überladen und mein QPixmap darstellen:

Code: Alles auswählen

class MyListBoxItem: public QListBoxItem
{
    private:
        void paint();
};

aber, ...sorry ich bekomme es nicht hin!

Code: Alles auswählen

void MyListBoxItem::paint()
{
//  ?!?
}
EDIT:
nicht mit QListBoxPixmap, ich muss an den item's noch etwas anhängen
und auch später wieder darauf zugreifen und mit arbeiten ...

Re: [Qt3] QListBoxItem, als QPixmap in QListBox darstellen?

Verfasst: 10. September 2005 20:43
von jaipur
ups! habe gerade gesehen das ich übersehen habe das QListBoxPixmap
genau ist das was ich brauche, weil es von QListBoxItem vererbt wurde
und nicht von QListBox, also sind QListBoxPixmap items ....sorry! oder?