summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-10-31 16:01:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-23 17:04:00 +0100
commit2e78d7ac30813add2f57f8b50c969fb71212e3e6 (patch)
treef67d02d948c7621a9d304f96068598dbfd7228c7 /tests
parentc6754c2720d09488ba7483bb6ef8c37a9b7f833c (diff)
QHeaderView - Fix auto-scroll on manual move on sections
This patch fixes the manual move of sections when auto scroll is on. It is done in QAbstractItemView::doAutoScroll by letting the qheaderView use its parents scrollbars if they are childs of a QTableView or QTreeView. Task-number: QTBUG-993 Task-number: QTBUG-1103 Change-Id: I70d999d9a07c3566e42d01cc5ebb47a69a83d9d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
index 5a1db1383f..2fc7bbec43 100644
--- a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
+++ b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
@@ -97,14 +97,14 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QTableView tv;
QStandardItemModel m;
- m.setRowCount(10);
- m.setColumnCount(36);
+ m.setRowCount(500);
+ m.setColumnCount(250);
tv.setModel(&m);
SomeHandler handler(tv.horizontalHeader(), &tv);
- tv.horizontalHeader()->setDefaultSectionSize(50);
+ tv.horizontalHeader()->setDefaultSectionSize(30);
+ tv.show();
tv.horizontalHeader()->setSectionsMovable(true);
- tv.showMaximized();
+ tv.verticalHeader()->setSectionsMovable(true);
app.exec();
}
-
#include "qheaderviewtest1.moc"