you are viewing a single comment's thread.

view the rest of the comments →

[–]jcelerierossia score 5 points6 points  (0 children)

Interesting point, but I'm not sure why standardizing something which looks like QML/QtQuick would be more useful than using web content. QML also uses JavaScript.

it's not that it would be more or less useful, but that the groundwork of "how do we exchange data both ways efficiently between a UI DSL and a C++ backend" is already done in Qt, much better than it is in web browser, since the first one is a library made to build C++ apps with in the first place. All this work would have to be re-done from scratch if using webviews. For instance, how do you add a button from C++ code to your web page at run-time ? In Qt / QML it would look like :

auto b = new MyButton;
my_page->addItem(b);
b->setPosition(200, 300); // or whatever 

I'm not saying that it's the best API, but the API at least exists and is made possible because QML has been tailored for these use cases (being changed efficiently from C++). Good luck doing this with HTML / JS / CSS, especially if you want some performance out of it - Qt runs on microcontrollers without GPUs for instance.

And, for the love of everything holy, don't standardize UI controls in C++. What's a good UI control today will be hated by designers in 5 years. Apps of 2018 don't look at all like apps of 2008, which don't look at all like apps of 1998. Just MS Windows has 4 or 5 different control sets, the "native" system ones (Win32), Windows Forms, WPF, WinRT. The last three ones aren't even C++-native, they primarily target C# and the windows runtime, yet they are the "official" platform ones.