AnalogGauge.qml
import QtQuick 2.0
import QtQuick.Extras 1.4
import QtQuick.Controls.Styles 1.4
Item {
id:itemParent
property real valueIn: 888888//valeur brut du protocole
property int valprecision:1
property var objChamps
property int valminValue
property int valmaxValue
property int valangleMin:-120
property int valangleMax:120
property real vallabelStepSize
property real valtickmarkStepSize
property real valminorTickmarkCount
property real valstepToMoveNeedle
Rectangle{
anchors.fill:parent
color:"red"
MouseArea{
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill:parent
onClicked: console.log("test")
}
}
}
import QtQuick 2.0
import QtQuick.Extras 1.4
import QtQuick.Controls.Styles 1.4
Item {
id:itemParent
property real valueIn: 888888//valeur brut du protocole
property int valprecision:1
property var objChamps
property int valminValue
property int valmaxValue
property int valangleMin:-120
property int valangleMax:120
property real vallabelStepSize
property real valtickmarkStepSize
property real valminorTickmarkCount
property real valstepToMoveNeedle
Rectangle{
anchors.fill:parent
color:"red"
MouseArea{
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill:parent
onClicked: console.log("test")
}
}
}
To copy to clipboard, switch view to plain text mode
AnalogGauge{
objectName: "AFR"
width:180
height:180
valminValue: 12
valmaxValue: 18
valstepToMoveNeedle:0.1
vallabelStepSize:1
valtickmarkStepSize:0.5
valminorTickmarkCount:4
valangleMin: -90
valangleMax: 90
objChamps:appli.getChamps(1,3)
}
AnalogGauge{
objectName: "AFR"
width:180
height:180
valminValue: 12
valmaxValue: 18
valstepToMoveNeedle:0.1
vallabelStepSize:1
valtickmarkStepSize:0.5
valminorTickmarkCount:4
valangleMin: -90
valangleMax: 90
objChamps:appli.getChamps(1,3)
}
To copy to clipboard, switch view to plain text mode
hello! my mouseArea not works, i don't understand, but rectangle is really "red"
please help me.
thank's
Bookmarks