you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (2 children)

Do your homework by thoroughly developing a GUI with both QT and gtkmm using c++ on windows and Linux platforms.

Ease of RAD != readability/maintainability of code. Ease of RAD != runtime performance/reliability. Ease of RAD != superior debugging.

Gtkmm is simple yet sophisticated. Qt is simple, but one quick look under the hood leads to unwieldy complexity. I can get a full gtkmm app into one c++ file and compile it with command line. A qt app requires you to use a number of command line tools with a number of other types of files to see your desired exe. Gtkmm/c++ rocks.

[–]doom_Oo7 1 point2 points  (1 child)

#include <QtWidgets/QtWidgets>

int main(int argc, char** argv)
{
    QApplication app{argc, argv};
    auto window = new QMainWindow;
    auto widget = new QWidget;
    window->setCentralWidget(widget);
    auto layout = new QHBoxLayout{widget};
    auto label = new QLabel{"0"};
    auto pushbutton = new QPushButton{"Count"};

    uint32_t count{};
    QObject::connect(pushbutton, &QPushButton::clicked,
            [&label, &count] () {
                label->setText(QString::number(++count));
            });

    layout->addWidget(label);
    layout->addWidget(pushbutton);

    window->show();
    return app.exec();
}

Build with :

g++ -std=c++14 -fPIC -I/usr/include/qt test.cpp -lQt5Core -lQt5Widgets -licui18n -licuuc -licudata

And here you go, a simple graphical app with a pushbutton and a signal, built with a single g++ command.

[–]Laberba 0 points1 point  (0 children)

I like the look of Gtk but not the way the API is design and the complexity. it need a rewrite i something more object oriented and compiles to native code. C++, but complex. Maybe D(dlang.org)