PDA

View Full Version : Refresh tableView in TabWidget



karlkar
11th August 2013, 02:05
Hello.
I have a QTableView nested in one of the QTabWidget.
My problem is that after opening the tab with QTableView not all of the data is visible - there is place for 5 rows, but visible are only 2. All rows show up only after resizing window. I tried to map signal currentChanged(int) from QTabWidget to doItemsLayout() slot of QTableView, but without success - it is emitted too soon. Mapping QTableView's clicked(QModelIndex) to doItemsLayout() works, but I do want it to be reloaded just after opening the tab, not after the user's interaction. How can I achieve this?

Rajesh.Rathod
12th August 2013, 05:47
You can derive your class from QTableView and override it's showEvent & call your lay out change there.