Hello,

I have subclassed QLixtBoxText in order to add an integer value to the items for later processing.

When I want to access this value named "id" i.e. through AListBoxPointer->item(anumber)->id my compiler tells me this
"error: 'class QListBoxItem' has no member named 'id'"

when I override rtti to a different value it will give me this different value. But the compiler (maybe?) doesnt know my type?

Here's my code, i'm new (2 weeks) to qt, so don't be too hard on me

programitem.h:
#include "qlistbox.h"

class ProgramItem: public QListBoxText {

public:
ProgramItem(const QString & text = QString::null);
~ProgramItem();
int rtti ();
int id;
};

programitem.cpp:
#include "programitem.h"
#include "qlistbox.h"

ProgramItem::ProgramItem( const QString & text) : QListBoxText(text)
{

}

int ProgramItem::rtti(){
return 1;
}


tried usage snippet with error:
ProgramItem *temp;
temp = new ProgramItem("teststring");
temp->id = 4 //just for test
available_programs->insertItem(temp); //available_programs is normal Listbox
int tester = available_programs->item(0)->id; // here comes the error