Remix.run Logo
coffeeaddict1 9 days ago

This is what you can with Qt:

    #include <QApplication>
    #include <QWidget>
    #include <QPainter>

    class widget : public QWidget {
    void paintEvent(QPaintEvent*) override {
        QPainter(this).drawEllipse(QPoint(320, 240), 100, 100);
    }
    };

    int main(int argc, char *argv[]) {
        QApplication app(argc, argv);
        widget w;
        w.resize(640, 480);
        w.show();
        return app.exec();
    }

It doesn't seem too complicated to me.
ecshafer 9 days ago | parent [-]

That doesn't seem too bad, I agree. Maybe that's why QT is used. I haven't really used QT, but the more modern Windows apis, vulkan, etc all are pretty complicated.

cwillu 9 days ago | parent | next [-]

FWIW, vulkan is not a GUI library; if you're reaching for it without a clear understanding of why you're doing so, yeah, it'll seem like a very complicated way of doing things.

TheRoque 9 days ago | parent | prev | next [-]

Vulkan is a graphics API, not a UI library or framework. It's way lower level and if your goal is to make a user interface, you're not really supposed to do it with Vulkan (but you could i guess)

nnevatie 9 days ago | parent | prev | next [-]

Yeah, it doesn't look too bad on the surface. However, Qt is bad and I'd advice moving away from it if you can. This is based on ~20 years of experience using it in various projects.

The licensing is trying to paint a picture of LGPL being somehow uncertain/evil, the way Qt advocates non-idiomatic C++ practices - I could go on for days, but shall digress.

jetbalsa 9 days ago | parent | prev | next [-]

Thats why I've always like pytk

    from tkinter import \*

    root = Tk()
    a = Label(root, text ="Hello World")
    a.pack()

    root.mainloop()
nandomrumber 9 days ago | parent | prev [-]

It’s Qt and pronounced ‘cute’.

https://en.wikipedia.org/wiki/Qt_(software)