HeaderViewStretcher: Fix bug in resize code

Change-Id: Ia62d4c64418e7d616b5dd90d0eda2a2ee985c2d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2013-03-20 15:47:17 +01:00
parent a183bb8ea1
commit c0cc6ce5af
2 changed files with 2 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ bool HeaderViewStretcher::eventFilter(QObject *obj, QEvent *ev)
if (hv->resizeMode(m_columnToStretch) == QHeaderView::Interactive) {
QResizeEvent *re = static_cast<QResizeEvent*>(ev);
int diff = re->size().width() - re->oldSize().width() ;
hv->resizeSection(m_columnToStretch, qMax(32, hv->sectionSize(1) + diff));
hv->resizeSection(m_columnToStretch, qMax(32, hv->sectionSize(m_columnToStretch) + diff));
}
}
}

View File

@@ -37,7 +37,7 @@
#include "icore.h"
#include "id.h"
#include <utils/treewidgetcolumnstretcher.h>
#include <utils/headerviewstretcher.h>
#include <QKeyEvent>
#include <QShortcut>