rakkar
21st September 2009, 18:42
QTableView *tableViewWidget;
int from;
I want to make tableViewWidget scroll down to show the row such that 'from' is the first row displayed.
I've tried all of the following over the last half hour, without success
tableViewWidget->showRow(from);
tableViewWidget->selectRow(from);
QModelIndex modelIndex = tableViewWidget->indexAt(QPoint(0,from));
tableViewWidget->scrollTo(modelIndex);
I traced through scrollTo, and it works (the index is valid). But the view doesn't update.
I appreciate any help.
int from;
I want to make tableViewWidget scroll down to show the row such that 'from' is the first row displayed.
I've tried all of the following over the last half hour, without success
tableViewWidget->showRow(from);
tableViewWidget->selectRow(from);
QModelIndex modelIndex = tableViewWidget->indexAt(QPoint(0,from));
tableViewWidget->scrollTo(modelIndex);
I traced through scrollTo, and it works (the index is valid). But the view doesn't update.
I appreciate any help.