PDA

View Full Version : List Widget need help!



patrick772goh
15th August 2007, 09:04
I am using QT 4.3, i got 5 icon in a listwidget,
Normal cases:
when one icon is selected, the icon background change to dark blue and i click OK.
QListWidgetItem * icon_A;
if(ui.listwidget->isItemSelected(icon_A))
{
.....;
}

Error occur when:
when one icon is selected, the icon background change to dark blue and i click some place near the icon and the dark blue disappear and left a dotted rectangle box around the icon.
The isItemSelected(icon_A) no longer valid, any other function to detect i selected the dotted line rectangle box icon? Thanks in advance!

wysota
15th August 2007, 10:25
Try using currentItem().