Originally posted by Nth_man
View Post
Announcement
Collapse
No announcement yet.
The Qt Company Provides A Brief Comment On Open-Source
Collapse
X
-
Originally posted by TemplarGR View PostGTK4 is going to be a very modern toolkit. And if KDE decides to write Plasma 6 on top of GTK4/Gnome technologies, they will have much less workload than today, because the heavy lifting for the infrastructure will be done by Red Hat and the rest of behemoths who support GNOME. KDE will only have to maintain their fork, like the Cinnamon guys do
- Likes 1
Comment
-
> You're comparing C and C++.
Anyone can go to gtk.org and see the samples they show, no C++ there, but yes Gtk and Rust:
From gtk.org:
Code:use gio::prelude::*; use glib::clone; use gtk::prelude::*; // When the application is launched… fn on_activate(application: >k::Application) { // … create a new window … let window = gtk::ApplicationWindow::new(application); // … with a button in it … let button = gtk::Button::new_with_label("Hello World!"); // … which closes the window when clicked button.connect_clicked(clone!(@weak window => move |_| window.destroy())); window.add(&button); window.show_all(); } fn main() { // Create a new application let app = gtk::Application::new(Some("com.github.gtk-rs.examples.basic"), Default::default()) .expect("Initialization failed..."); app.connect_activate(|app| on_activate(app)); // Run the application app.run(&std::env::args().collect::<Vec<_>>()); }
From https://wiki.qt.io/Qt_for_Beginners:
Code:#include <QApplication> #include <QPushButton> int main(int argc, char **argv) { QApplication app (argc, argv); QPushButton button ("Hello world !"); button.show(); return app.exec(); }
- Likes 2
Comment
-
Maybe it makes more sense to compare e.g. a listview/treeview
https://developer.gnome.org/gtkmm-tu...amples.html.en
And these are similar examples in Qt.
https://code.qt.io/cgit/qt/qtbase.gi...terview?h=5.14
https://code.qt.io/cgit/qt/qtbase.gi...eemodel?h=5.14
It is a matter of taste, I guess. I personally like GTKs tree model more than the equivalent functionality in Qt. The file sizes are comparable.
EDIT:
An editable tree model in Qt5
Last edited by oleid; 09 April 2020, 09:40 AM.
- Likes 4
Comment
-
Originally posted by Nth_man View Post> You're comparing C and C++.
Anyone can go to gtk.org and see the samples they show, no C++ there, but yes Gtk and Rust:
- Likes 5
Comment
-
Originally posted by TemplarGR View Post
Seriously, enough with the FUD, this is getting ridiculous.... GTK is not inferior, it is just that its scope is limited while Qt contains much more. The other libraries you mention have similar alternatives inside Qt, just because in GNOME they have different names while in the Qt world they are all under the umbrella of Qt doesn't mean they aren't there.
GTK4 is going to be a very modern toolkit. And if KDE decides to write Plasma 6 on top of GTK4/Gnome technologies, they will have much less workload than today, because the heavy lifting for the infrastructure will be done by Red Hat and the rest of behemoths who support GNOME. KDE will only have to maintain their fork, like the Cinnamon guys do. Look at Cinnamon development, began by a few distro developers and became a full fledged DE easily by just riding on top of vanilla GNOME and doing their own changes on top of it. If the Cinnamon guys can do it, KDE guys can do it better.
- Likes 2
Comment
-
Originally posted by Nth_man View Post> You're comparing C and C++.
Anyone can go to gtk.org and see the samples they show, no C++ there, but yes Gtk and Rust:
From gtk.org:
Code:use gio::prelude::*; use glib::clone; use gtk::prelude::*; // When the application is launched… fn on_activate(application: >k::Application) { // … create a new window … let window = gtk::ApplicationWindow::new(application); // … with a button in it … let button = gtk::Button::new_with_label("Hello World!"); // … which closes the window when clicked button.connect_clicked(clone!(@weak window => move |_| window.destroy())); window.add(&button); window.show_all(); } fn main() { // Create a new application let app = gtk::Application::new(Some("com.github.gtk-rs.examples.basic"), Default::default()) .expect("Initialization failed..."); app.connect_activate(|app| on_activate(app)); // Run the application app.run(&std::env::args().collect::<Vec<_>>()); }
From https://wiki.qt.io/Qt_for_Beginners:
Code:#include <QApplication> #include <QPushButton> int main(int argc, char **argv) { QApplication app (argc, argv); QPushButton button ("Hello world !"); button.show(); return app.exec(); }
https://developer.gnome.org/gtkmm-tu...xample.html.en
Code:#include <gtkmm.h> int main(int argc, char *argv[]) { auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base"); Gtk::Window window; window.set_default_size(200, 200); return app->run(window); }
- Likes 6
Comment
-
Originally posted by oleid View Post
The only difference is that it would seem you can create a push button in Qt without any window. But who does that in a real application anyway? Again, the size of a hello world app is irrelevant.
- Likes 1
Comment
-
Originally posted by bug77 View Post
Strictly from a resource reuse point of view, that's a great bonus: the ability to create common components once, insert them when needed.
- Likes 1
Comment
-
Comment