PDA

View Full Version : Check to see if a listwidget has a selected item



FoleyX90
16th May 2010, 23:22
I'm not sure how to do this. I need to know how to check to see if a listwidget has an item selected or not.

FoleyX90
16th May 2010, 23:40
Nevermind. I figured it out. For future reference:

if(this->ui->listWidgetRadiology->selectedItems().size() != 0)
QString selectedFile = this->ui->listWidgetRadiology->currentItem()->text();