Hi all.
I want to encapsulate a MouseArea with an item that adds some additional logic and, expose the same signals (with the same parameters).
I tried to expose the "pressed" and "released" signals as follows (with a parameter of MouseEvent type, as the original signals):
Qt Code:
import QtQuick 2.0 Item { signal pressed(MouseEvent mouse) signal released(MouseEvent mouse) MouseArea { anchors.fill: parent onPressed: parent.pressed(mouse) onReleased: parent.released(mouse) } }To copy to clipboard, switch view to plain text mode
But, it seems like it doesn't recognize the MouseEvent type.
What do I do wrong? Is there a way to declare variables with the MouseEvent type?
Bookmarks