1
我試圖將MouseArea信號傳播給父對象,但使用MouseEvent作爲參數類型會導致導入錯誤。如何在QML信號中傳遞MouseEvent參數
import QtQuick 2.0
import org.kde.plasma.core 2.0
Rectangle {
id: linkRect
signal clicked(MouseEvent mouse)
ToolTipArea {
id: tooltip
anchors.fill: parent
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: linkRect.clicked(mouse)
}
}
}