Project

General

Profile

Actions

Bug #5945

open

WBoxLayout - WPieChart resizing does not work when nested into a WContainerWidget

Added by Daniel Lier over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/22/2017
Due date:
% Done:

0%

Estimated time:

Description

Hi,

the WPieChart resizing does work when it's added directly to the WBoxLayout only.

Please see the file attached (and comment #define HAPPY_RESIZING to see the difference).

I'm sure you can fix that.

Daniel


Files

PieChartResizing.cpp (2.71 KB) PieChartResizing.cpp Daniel Lier, 09/22/2017 06:39 PM
Actions #1

Updated by Daniel Lier over 7 years ago

In addition to the described problem above, the '->findWidget("object_name");' method does not find the object when it's located into the W (Box)Layout.

Actions #2

Updated by Wim Dumon over 7 years ago

Hey Daniel,

Wouldn't you have to instantiate an additional layout manager when adding an additional layer of containers? That is, if you expect it to behave identically. A layout manager only manages the size of the children of a widget, wheras the pie chart is now a child of a child.

BR,

wim.

Actions #3

Updated by Daniel Lier over 7 years ago

Note: plese ignore the last comment regarding '->findObject' it works as expected

Actions #4

Updated by Daniel Lier over 7 years ago

Hi Wim,

Wouldn't you have to instantiate an additional layout manager when adding an additional layer of containers? That is, if you expect it to behave identically. A layout manager only manages the size of the children of a widget, wheras the pie chart is now a child of a child.

Yes, I would add a layout manager for any additional WContainerWidget if needed. That's exactly what I'm after. It would look like that:

1. root() <- that's a WContainerWidget

1.1. layout manager

1.1.1. container

1.1.1.1. layoutmanager

1.1.1.1.1 container / widgets

1.1.2. container

1.1.2.1. layoutmanager

1.1.2.1.1 container / widgets

My first layout manager is a WBoxLayout and the resizing mechanism does resize the container.

And as for other HTML it should then resize the containing objects as well.

Daniel

Actions

Also available in: Atom PDF