Fix tst_QTreeView - setSortingEnabledChild
QTreeView is stretching the last section by default which was not considered in this test. It worked by accident on linux because there the default section size is 100 and the default window width is also 100. On windows this was not the case and therefore the test failed. Task-number: QTBUG-51149 Change-Id: I9be1c1e942fc19817713773fe29d4afa93d73232 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>bb10
parent
d58f3c4878
commit
633a0f5172
|
|
@ -1,2 +0,0 @@
|
|||
[setSortingEnabledChild]
|
||||
windows
|
||||
|
|
@ -2600,8 +2600,10 @@ void tst_QTreeView::setSortingEnabledChild()
|
|||
{
|
||||
QMainWindow win;
|
||||
QTreeView view;
|
||||
QStandardItemModel model(1,1);
|
||||
// two columns to not get in trouble with stretchLastSection
|
||||
QStandardItemModel model(1,2);
|
||||
view.setModel(&model);
|
||||
view.header()->setDefaultSectionSize(92);
|
||||
win.setCentralWidget(&view);
|
||||
const int size = view.header()->sectionSize(0);
|
||||
view.setSortingEnabled(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue