Project

General

Profile

Bug #7396

WTreeView not working when hidden during construction

Added by Geert Verbruggen over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/10/2020
Due date:
% Done:

0%

Estimated time:

Description

When a WTreeView is hidden at construction (e.g. as child of

a WStackedWidget), resizing of the column widths is not working and data are

sometimes not displayed.

Using version 4.1.2

The attachment contains an test case, based on the WTreeView example.

Just replace TreeViewExample.C in the original example by the attached file

I added 3 lines:

43,44d42

< panel->hide();

<

96,98d93

<

< b = wc->addWidget(cpp14::make_unique("Show"));

< b->clicked().connect(panel, &WPanel::show);

The first line hides the panel containing the treeview at construction time.

Line 2 and 3 add a button to manually show the panel.

Start the application and press Show. Then try to resize the columns.

If you remove 'panel->hide()' everything works perfect again


Files

TreeViewExample.C (7.62 KB) TreeViewExample.C Geert Verbruggen, 01/10/2020 02:33 PM
panel_resize_sensor.patch (804 Bytes) panel_resize_sensor.patch Roel Standaert, 01/27/2020 03:21 PM
forum_16637.cpp (1.15 KB) forum_16637.cpp Roel Standaert, 01/30/2020 04:33 PM
forum_16637_2.cpp (1.73 KB) forum_16637_2.cpp Roel Standaert, 01/30/2020 04:33 PM

Also available in: Atom PDF