Project

General

Profile

Actions

Bug #1074

closed

Removing widget from container with layout

Added by Rob Van Dyck about 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/28/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I'm seeing unexpected behaviour when removing a widget from a container with a layout. It looks like the layout is 'copied' and appears twice on the page (with the same id). One time original, one time with the removed item removed. Please see the screenshot and attached code.

What am I doing wrong?

void HelloApplication::create()

{

box_ = new WGroupBox(root());

box_->setTitle("test");

WGridLayout *layout = new WGridLayout();

box*->setLayout(layout*_, AlignTop);

layout->addWidget(new WText("testitem1"), 0, 0);

layout->addWidget(new WText("testitem2"), 1, 0);

WPushButton *remove = new WPushButton("test_remove", root());

remove->clicked().connect(boost::bind(&HelloApplication::test_response, this));

}

void HelloApplication::test_response()

{

// box*layout()>removeWidget(box*->children().at(0));

box_removeWidget(box_>children().at(0));

}

I'm using 3.1.11

Kind regards,

Rob.


Files

wt_remove_widget.png (21.2 KB) wt_remove_widget.png Rob Van Dyck, 11/28/2011 09:47 AM
Actions #1

Updated by Koen Deforche about 13 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.2.1

Hey Rob,

Thanks. An off-by-one error, fixed in git now.

Regards,

koen

Actions #2

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF