From dfc3a0cb136592ff226bf7e4a5194b911d54b9ab Mon Sep 17 00:00:00 2001 From: raulbehl Date: Thu, 12 Feb 2015 18:58:30 +0530 Subject: Using updateGeometries() instead of processEvents() --- src/widget/wlibrarytableview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/widget/wlibrarytableview.cpp') diff --git a/src/widget/wlibrarytableview.cpp b/src/widget/wlibrarytableview.cpp index 6ef265f6ab..1d765e8bd0 100644 --- a/src/widget/wlibrarytableview.cpp +++ b/src/widget/wlibrarytableview.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include "widget/wwidget.h" #include "widget/wskincolor.h" @@ -67,7 +66,7 @@ void WLibraryTableView::loadVScrollBarPosState() { void WLibraryTableView::restoreVScrollBarPos() { //Restore the scrollbar's position (scroll to that spot) //when the search has been cleared - QCoreApplication::processEvents(); + updateGeometries(); verticalScrollBar()->setValue(m_iSavedVScrollBarPos); } @@ -123,3 +122,7 @@ void WLibraryTableView::setTrackTableRowHeight(int rowHeight) { verticalHeader()->setDefaultSectionSize(math_max( rowHeight, fontHeightPx)); } + +void WLibraryTableView::updateGeometries() { + QTableView::updateGeometries(); +} -- cgit v1.2.3