Re: [Interest] QML detecting swipe gesture for open side menu
Just a note, also make sure your hover mouse area is parent of all other, sibling mouse area doesn't propagate. This is really annoying to wrap wigets into independent component sometime with this behavior. On Apr 15, 2015, at 4:51 AM, Federico Buti bacaro...@gmail.com wrote: Hi, did you checked the propagateComposedEvents property? The problem could become quite tricky but you can give this property a try. Cheers, F. On 15 April 2015 at 10:28, Gianluca gmax...@gmail.com wrote: Hello, my real problem is not to detect swipe gestures, but avoid that the MouseArea block any clicks. For example, if you have a ListView and the items into the ListView has MouseArea that react to clicks, then if you start to drag the ListView the click is not delivered to the MouseArea contained into the Items, but if you just click then this click is not handled by ListView but forwarded to the MouseArea contained into the Items. That’s the big problem for me: How the ListView achieve this behavior ? Is that possible to replicate this behavior with QML MouseArea ? Because I want to have a swipe detector that cover the entire screen, as the ListView does (and how the PathView also does). Thanks, Gianluca. Il giorno 15/apr/2015, alle ore 10:21, Federico Buti bacaro...@gmail.com ha scritto: Hi Gianluca, you should be able to simulate swipe gestures with a MouseArea. See this code for example. Cheers, F. --- Federico Buti On 14 April 2015 at 20:27, Daiwei Li daiwe...@gmail.com wrote: Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca gmax...@gmail.com wrote: Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QML detecting swipe gesture for open side menu
Hi Gianluca, you should be able to simulate swipe gestures with a MouseArea. See this code for example https://gist.github.com/kovrov/1742405. Cheers, F. --- Federico Buti On 14 April 2015 at 20:27, Daiwei Li daiwe...@gmail.com wrote: Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca gmax...@gmail.com wrote: Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QML detecting swipe gesture for open side menu
Hello, my real problem is not to detect swipe gestures, but avoid that the MouseArea block any clicks. For example, if you have a ListView and the items into the ListView has MouseArea that react to clicks, then if you start to drag the ListView the click is not delivered to the MouseArea contained into the Items, but if you just click then this click is not handled by ListView but forwarded to the MouseArea contained into the Items. That’s the big problem for me: How the ListView achieve this behavior ? Is that possible to replicate this behavior with QML MouseArea ? Because I want to have a swipe detector that cover the entire screen, as the ListView does (and how the PathView also does). Thanks, Gianluca. Il giorno 15/apr/2015, alle ore 10:21, Federico Buti bacaro...@gmail.com ha scritto: Hi Gianluca, you should be able to simulate swipe gestures with a MouseArea. See this code for example. Cheers, F. --- Federico Buti On 14 April 2015 at 20:27, Daiwei Li daiwe...@gmail.com wrote: Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca gmax...@gmail.com wrote: Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QML detecting swipe gesture for open side menu
Hi, did you checked the propagateComposedEvents property http://doc.qt.io/qt-5/qml-qtquick-mousearea.html#propagateComposedEvents-prop? The problem could become quite tricky but you can give this property a try. Cheers, F. On 15 April 2015 at 10:28, Gianluca gmax...@gmail.com wrote: Hello, my real problem is not to detect swipe gestures, but avoid that the MouseArea block any clicks. For example, if you have a ListView and the items into the ListView has MouseArea that react to clicks, then if you start to drag the ListView the click is not delivered to the MouseArea contained into the Items, but if you just click then this click is not handled by ListView but forwarded to the MouseArea contained into the Items. That’s the big problem for me: How the ListView achieve this behavior ? Is that possible to replicate this behavior with QML MouseArea ? Because I want to have a swipe detector that cover the entire screen, as the ListView does (and how the PathView also does). Thanks, Gianluca. Il giorno 15/apr/2015, alle ore 10:21, Federico Buti bacaro...@gmail.com ha scritto: Hi Gianluca, you should be able to simulate swipe gestures with a MouseArea. See this code for example https://gist.github.com/kovrov/1742405. Cheers, F. --- Federico Buti On 14 April 2015 at 20:27, Daiwei Li daiwe...@gmail.com wrote: Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca gmax...@gmail.com wrote: Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QML detecting swipe gesture for open side menu
Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QML detecting swipe gesture for open side menu
Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca gmax...@gmail.com wrote: Hello, I’m trying to achieve something very common on the mobile app: the swipe from left to right made from the left side of the screen that display the lateral menu of the app. I didn’t find any way to do with QML. First of all, there is no SwipeGesture item into QML (while there is PinchArea). (why there is no QML item for recognize the other common gestures?) Then I tried to cover the entire screen with a MouseArea with an high z value in order to implement a simple recognizer by myself, but I didn’t find any way to propagate all mouse events in order to allow to all other MouseArea present behind to work properly. I’m blocked. I don’t have any other ideas. Any idea ? suggestions ? Thanks, Gianluca. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest