On Thu, 18 Apr 2019 19:32:11 +0200, Mike Wey wrote:

Replace MainWindow with Window and it should work.

I'm not sure what the MainWindow class was trying to accomplish but it
sets up a handler for the delete event that quits the gtk mainloop, and
that causes the application to close.

This solved it, thank you :-)