Horizon1710
Horizon1710

Reputation: 822

Focusing on last data entry on Qtreewidget

I am trying to use Qtreewidget as listview (like in C#) to display some data. As seen on the image below, while new datas displayed during the runtime, the widget doesn't focus on the last entry.That is what I want but couldn't find a method to make it focus on the last entry. In other words, I want it to be scrolled down to the last entry. Is there any way to do it or do I have to use something another to handle this ?

Thanks in advance.

enter image description here

Upvotes: 0

Views: 216

Answers (1)

Fatih Odaci
Fatih Odaci

Reputation: 1

Maybe this code will helps you:

QTreeWidget *mytree = new QTreeWidget(this);
...
mytree->scrollToBottom();

Upvotes: 0

Related Questions