Hello,
I am trying to display simple string in QListWidget.
I want to limit the size of item of QlistWidget.
It is not possible to remove item. removeItemWidget function does not work.
Any idea?
Thanks
I use following code.
void SQLTest::UpdateList(QString receivedData)
{
ui.debugList->addItem(new QListWidgetItem(receivedData));
ui.debugList->setCurrentItem(item);
qDebug() << ui.debugList.count() ;
if (ui.debugList->count() == 5){
ui.debugList->removeItemWidget(ui.debugList->item(0));
qDebug() << ui.debugList->count();
}
}
Bookmarks