You have a #Gtk4 application, written in python with #PyGObject, which use a template to build a window.
If you define a callback in code but you do not use it in template, an exception is raised.
If you use a callback in template which is not defined in code, no errors are reported.
But.
CSS classes are not applied to widgets. 🤷
Look:
With the callback:
Without the callback:
I lost some good hours trying to find why my button was not styled.
#Gtk 4.16.5
like this
nicoz :debian:
in reply to Fabio • • •