title: GTK+Python: callback outside main class
body: <p>I'm playing with GTK and Python for the very first time. I'm using GNOME Builder. My project has just one .ui whose class is defined in a .py file. I have only one window with a single button.
  That said, here below I paste the code:</p>
  <pre><code>    from gi.repository import Gtk
      import os
  
  
  @Gtk.Template(resource_path='/one/two/three/window.ui')
  class Test1Window(Gtk.ApplicationWindow):
      __gtype_name__ = 'Test1Window'
  
      def __init__(self, **kwargs):
          super().__init__(**kwargs)
          
      @Gtk.Template.Callback()
      def myButtonAction(self, widget):
          print('Hello world!')
  </code></pre>
  <p>This code works. Ok. Then I tried to put the callback outside the class or in other one, but that doesn't work. So my question is: does GTK+Python work in a way that all the callbacks assigned to widgets must be defined inside the class of the window where they are?</p>