Re: QTreeWidget selection
Sorry, I misread your post :)
Can you post a sample of code (compilable ?)
Re: QTreeWidget selection
Code:
ui.tree->setColumnCount(3);
labels << tr("Aap") << tr("Noot") << tr("Mies");
ui.tree-->setHeaderLabels(labels);
for(int i = 0; i < 10; ++i)
{
pItem->setText(0, "Aap");
pItem->setText(1, "Noot");
pItem->setText(2, "Mies");
}
In fact, this tree works fine. I have multiple row selection and selected rows turn blue...
however if I make items editable:
Code:
pItem->setFlags(Qt::ItemIsEditable);
I only see a rubberband around the column I want to change and no selected row. Why?
Also I cannot multiple select rows...
Re: QTreeWidget selection
Quote:
Originally Posted by
Arthur
Code:
ui.tree->setColumnCount(3);
labels << tr("Aap") << tr("Noot") << tr("Mies");
ui.tree-->setHeaderLabels(labels);
for(int i = 0; i < 10; ++i)
{
pItem->setText(0, "Aap");
pItem->setText(1, "Noot");
pItem->setText(2, "Mies");
}
In fact, this tree works fine. I have multiple row selection and selected rows turn blue...
however if I make items editable:
Code:
pItem->setFlags(Qt::ItemIsEditable);
I only see a rubberband around the column I want to change and no selected row. Why?
Also I cannot multiple select rows...
Try this.
pItem->setFlags(pItem->flags() | Qt::ItemIsEditable);
When You write
pItem->setFlags(Qt::ItemIsEditable); you clean all previus flags.