Hi all,

I have a Qlistwidget with which i create a list consisting of 2 items. the contents for the list are displayed in a QTextbrowser placed beside it. I set the current row to first item so that by defaults it points to the first element. When i click on the 2nd item, It takes almost around 5 seconds to appear in the textbrowser. What could be the issue here?

This is my code:

_list = new QListWidget(this);
QListWidgetItem *item1 = new QListWidgetItem;
item1->setText("List Item 1");
_list->insertItem(0, item1);
QListWidgetItem *item2 = new QListWidgetItem;
item2->setText("List Item 2");
_list->insertItem(1, item2);
_list->setSelectionMode(QAbstractItemView::SingleSelecti on);

CONNECT(_list->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelect ion)),
SLOT(onFocusChanged()));
_list->setCurrentRow(0, QItemSelectionModel::SelectCurrent);