Are we allowed to add children to a GTKMM4 SpinButton?
I am asking because I am seeing warnings like Finalizing gtkmm__GtkSpinButton 0x5643c846b150, but it still has children left
when the window is closed. A workaround to remove this warning when the child is the first spinbutton child is doing
spinbutton->signal_hide().connect([=]() { spinbutton->get_first_child()->unparent(); });
Is this a bug in GTKMM or the right way to add children to a spinbutton would be inheritance? What I did was adding them to the builder xml
<child>
<object class="GtkSpinButton" id="spin_button_priority">
<property name="numeric">1</property>
<property name="adjustment">realtime_priority</property>
<property name="xalign">1.0</property>
<child>
<object class="GtkLabel">
<property name="margin_start">3</property>
<property name="margin_end">3</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Priority</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
</object>
</child>
The child label is shown and I can move it around using C++ code. Everything seems fine until the window is closed and that warning is shown.
Edited by Wellington Wallace