diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2012-11-22 19:49:05 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-25 08:29:39 +0100 |
commit | 8d4544f00d9b977ac7b5bf8b0c4b783ded4084de (patch) | |
tree | 683404f140766bd85fa790f4d1d0bb5de8e4f2d2 /tests/manual | |
parent | dfc0fbabe1747e308a5daa8f6d41ff85aa5d86b5 (diff) |
QHeaderView: - avoid cursor move on setDefaultSectionSize
If we are reacting on the sectionResized signal and we call
setDefaultSectionSize we should ensure that we are not moving
the mouse-cursor.
This is an improvement of f8f6acb05ce9aa5fccc329bf5587adf14ed9a710
Change-Id: I1adee7821bc8fcc9633f692bfd515f2c458b12c8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp index 2fc7bbec43..7a8c1d159d 100644 --- a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp +++ b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp @@ -65,8 +65,7 @@ void SomeHandler::slotSectionResized(int logsection, int oldsize, int newsize) m_tv->setUpdatesEnabled(false); // Do some manual resizing - lets make every section having the new size. m_hv->blockSignals(true); - for (int u = 0; u < m_hv->count(); ++u) - m_hv->resizeSection(u, newsize); + m_hv->setDefaultSectionSize(newsize); m_hv->blockSignals(false); // Adjust offset and scrollbar. Maybe it isn't 100% perfect |