Results 1 to 4 of 4

Thread: why not works my mouseArea

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2016
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X

    Default why not works my mouseArea

    AnalogGauge.qml

    Qt Code:
    1. import QtQuick 2.0
    2. import QtQuick.Extras 1.4
    3. import QtQuick.Controls.Styles 1.4
    4.  
    5. Item {
    6. id:itemParent
    7. property real valueIn: 888888//valeur brut du protocole
    8. property int valprecision:1
    9. property var objChamps
    10. property int valminValue
    11. property int valmaxValue
    12. property int valangleMin:-120
    13. property int valangleMax:120
    14. property real vallabelStepSize
    15. property real valtickmarkStepSize
    16. property real valminorTickmarkCount
    17. property real valstepToMoveNeedle
    18.  
    19.  
    20. Rectangle{
    21. anchors.fill:parent
    22. color:"red"
    23.  
    24. MouseArea{
    25. acceptedButtons: Qt.LeftButton | Qt.RightButton
    26. anchors.fill:parent
    27. onClicked: console.log("test")
    28. }
    29. }
    30. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. AnalogGauge{
    2. objectName: "AFR"
    3. width:180
    4. height:180
    5. valminValue: 12
    6. valmaxValue: 18
    7. valstepToMoveNeedle:0.1
    8. vallabelStepSize:1
    9. valtickmarkStepSize:0.5
    10. valminorTickmarkCount:4
    11. valangleMin: -90
    12. valangleMax: 90
    13. objChamps:appli.getChamps(1,3)
    14. }
    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
    Last edited by anda_skoa; 11th March 2016 at 12:11. Reason: fix code tags

Similar Threads

  1. mousearea outside flickable not working
    By joko in forum Qt Quick
    Replies: 3
    Last Post: 15th December 2014, 16:36
  2. mousearea containsmouse property
    By joko in forum Qt Quick
    Replies: 8
    Last Post: 4th December 2014, 15:07
  3. MouseArea
    By Viper666 in forum Qt Quick
    Replies: 6
    Last Post: 10th January 2013, 13:30
  4. Replies: 3
    Last Post: 6th July 2011, 06:59
  5. Problem with MouseArea element
    By chiru in forum Qt Quick
    Replies: 1
    Last Post: 27th November 2010, 00:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.