WTreeNodes cannot be expanded
I have switched from wt-3.1.6 to latest git and i notice that i cannot expand the tree nodes anymore. Nothing happens when i click on the expand sign.
I haven't changed anything to my code. Is there an API change ?
Updated by Christophe Delépine about 11 years ago
I have spent quite some time analysing the problem. By simplifying my gui code as much as possible, i think i have isolated the bug :
Here is a piece of code :
WContainerWidget* container = new WContainerWidget(); WHBoxLayout *boxLayout = new WHBoxLayout(container); boxLayout->setContentsMargins(0, 0, 0, 0); WPanel* panel = new WPanel(); WTree* tree = new WTree(); panel->setCentralWidget(tree); // fill the tree with nodes... WStackedWidget* dynamicView = new WStackedWidget(); dynamicView->addWidget(new WContainerWidget()); boxLayout->addWidget(panel); boxLayout->addWidget(dynamicView_, 1);
If i replace the line
then it works !
I have other widgets above the container but i have not tried to remove them. I hope that they have no impact.
I can easily change my code to make it work. However, something must have changed between wt-3.1.6 and the current git and only you can tell if this new behavior is normal
P.S. the widget gallery project does not compile for non multithreaded builds due to StyleLayout.C. Had to remove this file. The tree works fine there. The problem was specific to my application