Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Fastest way to interact with QML

$
0
0
Hi everyone, I’m having a question regarding interaction between C++ and QML. I’ve a set of button with different click behaviour (one is pulse, one have to switch state, one have to follow press-release action and so on…), and I’m thinking at the best way to set this particular behaviour. I know the behaviour on the C++ side of the object, so my question is related to the fasted way (or the best memory-side one) to send the behaviour to the qml-object from c++: 1. Create a Q_INVOKABLE method that returns the behaviour and then check it everytime I need to do some action on the button (like on the onRelease function) 2. Sends signal with the expected behaviour from C++ to QML and then elaborate it once received. I’ve to say that my button isn’t on the first layer of my qml stack, they are on the second+ layer, so the signal have to pass thru one qml level before reach the elements. Any in-depth explanation on how this works? Thank you.

Viewing all articles
Browse latest Browse all 13965

Trending Articles