why not works my mouseArea
AnalogGauge.qml
Code:
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")
}
}
}
Code:
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)
}
hello! my mouseArea not works, i don't understand, but rectangle is really "red"
please help me.
thank's
Re: why not works my mouseArea
If you run AnalogGauge.qml in qmlscene, does it work?
Because I've just copied the code for it to a file and it did work.
Cheers,
_
Re: why not works my mouseArea
if the item is dragable but is create in grid/ row....
in this case, Mouse Area not work's, clicked not work's....
it's work's, i don't understand what is happening.
Re: why not works my mouseArea
Well, if you have code that does not work, wouldn't it be a good idea to post that instead of or additional to code that works?
Cheers,
_