While gtk4-demo works mostly fine, and I can compile and run plain C test programs, parts of gtk4.demo and whole gtk4-widget-factory refuse to run with messages like
$ gtk4-widget-factory
(gtk4-widget-factory:2245): GLib-GIO-ERROR **: 07:25:33.489: Settings schema
‘org.gtk.gtk4.Settings.ColorChooser’ is not installed
So I wonder if there is a trick to make gtk4 find it settings.
Glib library is loaded from /usr/bin because is not found under /opt/gtk/lib. The system Glib library searches for gsettings schemas under usr/share/glib-2.0/schemas.
So you can use the GSETTINGS_SCHEMA_DIR environment variable to point to the /opt/gtk/share/glib-2.0/schemas directory: