Results 1 to 4 of 4

Thread: mousearea outside flickable not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2014
    Posts
    104
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default Re: mousearea outside flickable not working

    Quote Originally Posted by wysota View Post
    Flickable also does mouse event handling and it probably steals events from your MouseArea. See if setting "preventStealing" to true helps.
    I already tried setting "preventStealing" to true, same issue.

    Thanks.

  2. #2
    Join Date
    Oct 2014
    Posts
    104
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default Re: mousearea outside flickable not working

    I managed to get it working by using propagateComposedEvents instead

    Qt Code:
    1. Item
    2. {
    3. MouseArea
    4. {
    5. id: mouseArea
    6. anchors.fill: parent
    7. onClicked: { console.log("yes") }
    8. }
    9.  
    10. Flickable
    11. {
    12. id: main
    13. contentHeight: 160
    14. anchors.fill: parent
    15. boundsBehavior: Flickable.StopAtBounds
    16. interactive: parent.height > contentHeight ? false : true
    17.  
    18. MouseArea
    19. {
    20. anchors.fill: parent
    21. propagateComposedEvents: true
    22. onClicked: { mouse.accepted = false }
    23. }
    24.  
    25. Rectangle
    26. {
    27. id: body
    28. anchors {
    29. left: parent.left
    30. right: parent.right
    31. }
    32. }
    33. }
    34. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by joko; 15th December 2014 at 19:28.

Similar Threads

  1. Flickable and mouse signal propagation
    By clousque in forum Qt Quick
    Replies: 7
    Last Post: 25th August 2014, 13:16
  2. Replies: 1
    Last Post: 18th July 2013, 14:31
  3. Replies: 0
    Last Post: 7th July 2013, 03:43
  4. MouseArea
    By Viper666 in forum Qt Quick
    Replies: 6
    Last Post: 10th January 2013, 14:30
  5. Replies: 0
    Last Post: 16th September 2012, 11:28

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.