3 ms·
Why not just use GTK or Qt?
by Kaze404 6y ago
Why not just use GTK or Qt?
- dheera 6y agoGTK: import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk class MyWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Hello World") self.button = Gtk.Button(label="Click Here") self.button.connect("clicked", self.on_button_clicked) self.add(self.button) def on_button_clicked(self, widget): print("Hello World") win = MyWindow() win.connect("destroy", Gtk.main_quit) win.show_all() Gtk.main() HTML: <html><body> <button onclick="alert('Hello World')">Click Here</button> </body></html> Now try implementing a swipe tab UI in GTK with animations and embedded video. In HTML you can probably import someone's awesome library .js file and be done with it in 5 minutes. Video is a snap. In GTK you have to deal with some idiotic factories, pipelines, sinks, faucets, and other god-knows-what abstractions. In HTML it's just <video>.
- Kaze404 6y agoYou could also use a glade file and only worry about functionality on the code itself. It's not too bad.