I want to show only icons in my QListWidget. I set text to empty string. When I select an icon I see an empty selected square on the text place. See the screenshot How can I get rid of this empty space?!
use NULL instead
ui->listWidget->addItem(new QListWidgetItem(QIcon(":/res/icon"),NULL));