QListWidget doesn't highlights selected item :(



  • Hello!

    When I select item or row, everything works fine, but the item remains not highlighted. Abstract from code:

    @
    ui->listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
    ui->listWidget->setCurrentRow(0);
    this->on_listWidget_clicked(ui->listWidget->currentIndex()); // Everything works here.
    ui->listWidget->currentItem()->setSelected(TRUE);
    ui->listWidget->currentItem()->isSelected(); // returns true here!
    ui->listWidget->show();
    @

    Please help me to find solution!

    [edit: added missing coding tags SGaist]


  • Lifetime Qt Champion

    Hi,

    You should at least add which version of Qt you are using and which OS you are running. Also how are you populating your QListWidget ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.