|
|
|
|
|
by zach43
2614 days ago
|
|
I think the question of "Why does it takes fifty lines to create a dialogue with a button" is very programming-language dependent: If you're working with a higher-level programming language, you can make cross-platform GUIs very easily (see tkinter + python as others have recommended) without having to write 50 LOC. If you're working with C / C++ specifically, then your bottleneck really is figuring out how to build and link with your cross platform library across all platforms. In my experience that has been much more painful than the lines of code required to set up a GUI in C++. Once you've got the build/deployment system working in C++, most GUI libraries don't need as much as 50 lines of code. For example, even with Qt this is the code to get a dialogue with a button: #include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();
return app.exec();
}
In newer low-level languages with sane standardized package managers, like Rust, things should be much better, but I'm finding any good examples right now |
|
It's not everything so broken...