Olivia
22nd April 2011, 18:28
Hi
I've created QMap of <String, MyClassItem> and I need to list all items in that map, by showing MyClassItemObject.name. I also would like to edit/remove an MyClassItemObject by selecting it on the list and pushing a button (causing new dialog to appear).
My first thought was to subclass QListWidgetItem, adding a pointer to object that has the same name as QListWidgetItem.text. Is that a good or bad idea?
I've created QMap of <String, MyClassItem> and I need to list all items in that map, by showing MyClassItemObject.name. I also would like to edit/remove an MyClassItemObject by selecting it on the list and pushing a button (causing new dialog to appear).
My first thought was to subclass QListWidgetItem, adding a pointer to object that has the same name as QListWidgetItem.text. Is that a good or bad idea?