gtkmm::builder - derived child widget's destructor is not called



Hello everybody,

I'm using gtk::builder to create a user-interface. To illustrate my
problem I simplified the interface to a window containing only one
button. I retrieve both widgets (window and button) using
"get_widget_derived" since they are modified by the code.
My problem arises at the end of the program, when the widgets should be
deleted.
The manual states that "toplevel" widgets (windows and dialogs) must be
deleted by the user, so I delete the window as prescribed. As the button
is inside a container (the window) I expect the button to be managed and
therefore being deleted automatically. This is not the case. The
destructor of the button is never called.
What is my mistake? Or is this a bug?

Attached you'll find a simple test program that you can compile using
g++ `pkg-config --libs --cflags gtkmm-3.0` gladetest.cpp
There you will directly see my problem.

I hope, I'm not bothering you with my stupid question.
Thanks in advance.

Moritz

Attachment: gladetest.cpp
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]