How to emit a keyspress signal ?
Unsolved
QML and Qt Quick
-
Hi there, I'm trying to emit a Keys.leftpressed signal after a mouse click.
This is what I try.MouseArea { anchors.fill: parent onClicked: { if (_state == 0) { Keys.leftPressed() } } }
But Keys.leftPressed require a argument.
I try thisMouseArea { property KeyEvent _event anchors.fill: parent onClicked: { if (_state == 0) { Keys.leftPressed(_event) } } }
And I got an error: "KeyEvent is not a type"
What I have to do now?
-