sorting qlistwidget items
-
wrote on 11 Dec 2015, 15:23 last edited by
im trying to sory qlistwidget items
sortItems(Qt::AscendingOrder);
when i call this function, the items are sucessfully sorted but i have to trigger an event (ie. right click on listwidget,leftclick,or anything) before it show the sorted items. -
wrote on 11 Dec 2015, 16:39 last edited by
Does it display them sorted if you call update() after sorting the items?
-
im trying to sory qlistwidget items
sortItems(Qt::AscendingOrder);
when i call this function, the items are sucessfully sorted but i have to trigger an event (ie. right click on listwidget,leftclick,or anything) before it show the sorted items. -
Hi,
Can you show how your are setting up your QListWidget ?
-
my QListWidget object in ui is a MyListWidget
heres my contrsuctor
MyListWidget::MyListWidget(QWidget* parent)
:QListWidget(parent)
{}
what do you mean by "how i set up my qlistwidget"?
1/6