Results 1 to 2 of 2

Thread: Propegate issue with mousearea and multitoucharea

  1. #1
    Join Date
    Apr 2017
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Propegate issue with mousearea and multitoucharea

    Hello,

    I have a question regarding the following problem that I'm having between mouse area and multitouch area. The problem that I'm having
    is that mouse area does not detect the onClicked. There is a mouseEnabled property that allows you to handle mouse events(if true) or
    allow pass through of the events so that they can be handled by other items underneath(if false). This pass through isn't working in my
    situation.

    Does anybody have an idea why the multitouch area does not propegate the events to the mouse area.

    Thank you in advance for the help.

    Qml code(main.qml):
    Qt Code:
    1. Window {
    2.  
    3. id: mainWindow
    4.  
    5. width: 1024
    6. height: 768
    7. minimumWidth: width
    8. minimumHeight: height
    9. maximumWidth: width
    10. maximumHeight: height
    11.  
    12. MouseArea {
    13. anchors.fill: parent
    14. onClicked: {
    15. console.log(mouse.x)
    16. }
    17. }
    18.  
    19. MultiPointTouchArea {
    20. anchors.fill: parent
    21. mouseEnabled: false
    22.  
    23. onTouchUpdated: {
    24. console.log("onTouchUpdated")
    25. }
    26.  
    27. onPressed: {
    28. console.log("onPressed")
    29. }
    30.  
    31. onReleased: {
    32. console.log("onReleased")
    33. }
    34.  
    35. onUpdated: {
    36. console.log("onUpdated")
    37. }
    38.  
    39. minimumTouchPoints: 2
    40. maximumTouchPoints: 2
    41.  
    42. touchPoints: [
    43. TouchPoint { id: point1 },
    44. TouchPoint { id: point2 }
    45. ]
    46. }
    47. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Propegate issue with mousearea and multitoucharea

    Hi
    Just tried your example and it works for me, but I'm using MouseArea and MultiPointTouchArea inside a Rectangle in a QQuickView app.
    Maybe it's some issue with Window, please try messing around with some Window flags, or maybe you can use a QQuickView ?
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Moving MouseArea.containsMouse
    By benberli in forum Newbie
    Replies: 1
    Last Post: 14th September 2016, 13:52
  2. why not works my mouseArea
    By kickoune in forum Qt Quick
    Replies: 3
    Last Post: 11th March 2016, 14:51
  3. mousearea outside flickable not working
    By joko in forum Qt Quick
    Replies: 3
    Last Post: 15th December 2014, 17:36
  4. Qt Quick button mousearea issue
    By joko in forum Qt Quick
    Replies: 2
    Last Post: 21st November 2014, 10:47
  5. MouseArea
    By Viper666 in forum Qt Quick
    Replies: 6
    Last Post: 10th January 2013, 14:30

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.