Important: Please read the Qt Code of Conduct -

[Solved] Best practice associating event handlers with state changes

  • Hi,

    Given the bug here: - what would be the "best practice" associating specific handlers with state? If you were implementing a vi-like keyboard interface, it seems superior to use a state machine but in the face of this bug, it is impossible.

    The alternatives I see are not very appealing.


  • The only workaround I've found so far is:

    Keys.onPressed: keyHandler(event)
    property var keyHandler: function(event){}
    ... PropertyChanges {
    target: whatever
    keyHandler: function(event){console.log(event.text)}

Log in to reply