Hi all.
I just register now and it is my first post here.
First my presentation: I'm from Spain and I'm trying to learn Qt in order to make multiplatform programs and program for Symbian S60 too.
Now the question:
I'm making a single program but cannot find the way to make the next issue:
I have a QListWidget with checkable items, and I want that when the user checks on one item, it hides automatically. I tried with on_lstList_itemSelectionChanged and with other slots, but it dont works well. It seems that this piece of code is executed before the item is checked (when I debug with QT Creator the signal comes when I just click on item, but the item is not checked until the slot finish), and dont works:
// If user checks an item, hide it.
void basket:n_lstList_itemSelectionChanged()
{
int i = ui->lstList->currentRow();
if (ui->lstList->item(i)->checkState() == Qt::Checked) {
ui->lstList->item(i)->setHidden(true);
}
}
Any ideas to this? Thanks in advice.
Bookmarks