This warning appears when I add a custom Gtk.Box
in a Gtk.Stack
.
class MainWindow(Gtk.ApplicationWindow):
"""
Class that inherits of Gtk.ApplicationWindow and that represents the main window application
"""
def __init__(self, app):
super().__init__(application=app)
self.builder = Gtk.Builder.new_from_file(UIS_PATH + 'main_window.xml')
self.set_titlebar(self.builder.get_object('mw_headerbar'))
self.add(self.builder.get_object('mw_main_vbox'))
stack = self.builder.get_object('mw_main_stack')
stack.add_titled(PersonsFom(self), 'persons_form', 'Gestão de Pessoas')
sidebar = Gtk.StackSidebar()
sidebar.set_stack(stack)
sidebar.set_size_request(200, -1)
mw_main_hbox = self.builder.get_object('mw_main_hbox')
mw_main_hbox .pack_start(sidebar, expand=False, fill=True, padding=0)
mw_main_hbox.reorder_child(sidebar, 0)
The warning appears when the execution flow is line stack.add_titled(PersonsFom(self), 'persons_form', 'Gestão de Pessoas')
. PersonsForm
is a sub-class of Gtk.Box
containing several components such as buttons
, Boxes
, Grids
, Entries
, ...
I do not understand what you mean this warning.
The MainWindow
class has parts built with glade file and PersonsForm
has too.
I will also leave the PersonsForm
code.
The git repository.