Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Controls 2 handling input with C++?
adutzu89 last edited by
On the differences page between controls 1 and 2 it states the follow:
In many cases, the internal state of a control can be more efficiently processed in C++. For example, handling input events in C++ makes a difference for controls that would otherwise need to create internal MouseAreas and attached Keys objects.
Is this referring on how the controls input are handled, or that we can handle controls input with C++?
I couldn't find any aditional info on this so I am curious.
Eeli K last edited by
@adutzu89 I think it's about internal private implementation, not about public API.
jpnurmi last edited by
That sentence in the docs seems a bit vague and confusing. It was apparently extracted from the http://blog.qt.io/blog/2015/03/31/qt-quick-controls-for-embedded/ blog post and copied to the docs without providing enough context.
What it tries to say, essentially, is that while Qt Quick Controls 1 tried to do as much possible in QML, Qt Quick Controls 2 moved all the logic and event handling to C++ instead. If you implement custom controls of your own, I'd highly recommend doing the same.