However, wouldn't the performance for this be very optimal? Check out the `Flex.qml` code[1]. It's all very unoptimized and dynamic QMLScript. None of the function arguments are typed. There is no way the QML compiler is turning any of this into efficient, statically typed C++ code. The beauty of using flexbox in the browser is that all the layout calculations are done natively in the browser without ever touching JavaScript.
[1] https://github.com/tripolskypetr/qml-flexbox/blob/master/qml...
[1] https://github.com/tripolskypetr/qml-flexbox/blob/master/obj...
[2] https://github.com/tripolskypetr/qml-flexbox/tree/master/thi...
[3] https://github.com/facebook/yoga
[4] https://github.com/tripolskypetr/qml-flexbox/blob/677a1287df...
P.S. I'll answer your other reply very soon. I'm releasing a new version of my app so it takes its toll on me.
On the web it's common to animate the size of flexbox items with CSS animations. These animations are entirely implemented by the browser, and I imagine much of it is even GPU accelerated. No JavaScript is executed for this on the browser. But with this library, you would be running the `Flex.qml`'s `updatePositions` function every frame of the animation. Isn't that wasteful when compared to how flexbox works in the browser? It seems like a browser would be much faster at computing layout for flexbox elements than this, especially when that flexbox's size is being animated with CSS animations.
[1] https://github.com/tripolskypetr/qml-flexbox/blob/master/qml...
Yeahh, looks like you'd have to connect to all these signals and be able to access sizing/position from C++. Not sure how possible this is, you probably know better than me.