gamenovice
6th May 2012, 05:37
Hello all,
I have been trying to make use of the QTreeWidget's indexFromItem to make use to access an actual index on a QStringList (for file writing purposes).
I can't show code b/c this is an offsite computer, but I need help.
when I try to do something like this:
void on_treeWidget_itemChanged(QTreeItem *item, int column)
{
int Index = ui->treeWidget->indexFromItem(item->parent(),0).row();
}
i get this error message saying indexFromItem is a protected member.
Ive tried direct input, such as:
QStringList list;
list.removeAt(ui->treeWidget->indexFromItem(item->parent(),0).row());
or even a failed attempt at getting and setting
I'm pressed for time, but I was hoping that somebody had the answers to this dilemma.
Thanks in advance,
gamenovice
ps. If I am not being clear, let me know
I have been trying to make use of the QTreeWidget's indexFromItem to make use to access an actual index on a QStringList (for file writing purposes).
I can't show code b/c this is an offsite computer, but I need help.
when I try to do something like this:
void on_treeWidget_itemChanged(QTreeItem *item, int column)
{
int Index = ui->treeWidget->indexFromItem(item->parent(),0).row();
}
i get this error message saying indexFromItem is a protected member.
Ive tried direct input, such as:
QStringList list;
list.removeAt(ui->treeWidget->indexFromItem(item->parent(),0).row());
or even a failed attempt at getting and setting
I'm pressed for time, but I was hoping that somebody had the answers to this dilemma.
Thanks in advance,
gamenovice
ps. If I am not being clear, let me know