How to make QlistWidget editable and have headers
Unsolved
General and Desktop
-
I have listwidget
I want to make all the items of listwidget as editable . is there any global we do that , I could not find in QT docsAlso how to have a header in QListWidget
-
I have listwidget
I want to make all the items of listwidget as editable . is there any global we do that , I could not find in QT docsAlso how to have a header in QListWidget
@Qt-Enthusiast
As the docs say:This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use QTreeView instead.
For edit item use flags.
for (int i = 1; i <= 10; i++) { auto item = new QListWidgetItem(QString::number(i)); item->setFlags(item->flags() | Qt::ItemIsEditable); ui->listWidget->addItem(item); }