My code seems right but doesn't display anything in my QListWidget. So, what am I doing wrong? Thanks for the help
list_widget->addItem(&add1);
list_widget->addItem(&add2);
list_widget->addItem(&add3);
list_widget->addItem(&add4);
QListWidgetItem add1("item 1", 0, 1);
QListWidgetItem add2("item 2", 0, 2);
QListWidgetItem add3("item 3", 0, 3);
QListWidgetItem add4("item 4", 0, 4);
list_widget->addItem(&add1);
list_widget->addItem(&add2);
list_widget->addItem(&add3);
list_widget->addItem(&add4);
To copy to clipboard, switch view to plain text mode
What I think should happen is this: I would have a QListWidget (made from a form) that shows item 1 to item 4... I am trying to use the type as an ID so that if item 1 is a different language then I have the ID not the string.
What happens is I don't see anything in my QListWidget (it is empty right after adding them all.) I am using QT 4.0
Bookmarks