• 0 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2024

help-circle


  • Knowing some stuff about the APIs of Qt and GTK, it would be a mighty difficult task to do properly. Qt and GTK don’t really “understand” anything, while they both have a declarative markup language (QML for Qt, GtkBuilder XML for Gtk) those are kinda just bolted-on to the imperative/object-oriented cores; that is to say, the abstractions they provide depend on a internal details and external libraries, and it would be a massive pain to design a single language around the constraints and idiosyncrasies of those two.

    So, instead of translating to those existing declarative languages, you’re probably better off just reimplementing your language in terms of the framework-native approach (imperative widget creation and a mainloop for GTK, OOP&signals for Qt). But this is also a lot of work to get right, even if you limit the available functionality.

    An LLM can probably vomit out a prototype for this in an hour, but I feel it will not be very useful to actually make apps.

    In short, you’re probably better off just reading https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications and setting QT_QPA_PLATFORMTHEME=gtk3 or smth.