int main(int argc, char *argv[])
{
QMainWindow *window;
QPushButton *button;
QApplication app(argc, argv);
window = new QMainWindow();
button = new QPushButton("Hello world!");
app.connect(button, SIGNAL("clicked()", window, SLOT("close()"));
...
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *button;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_button_new_with_label ("Hello World");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (window));
...
| The Following User Says Thank You to attila77 For This Useful Post: | ||
), what I tried to say was that if you write the UI handling in C++ you would really want to write the rest of the application (the part that actually does something) in C++ too, which I personally don't wish to. I agree that the C++/Qt API itself is decent.
| The Following User Says Thank You to TA-t3 For This Useful Post: | ||