Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Flickable with draggable Items inside

Flickable with draggable Items inside

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 960 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    h00bs
    wrote on last edited by
    #1

    I have a vertical Flickable, filled with Items that i want to drag out of the Flickable in horizontal direction.
    I also want to be able to flick when pressing on the items and NOT moving horizontally.
    Imagine something like e.g. a list of buildings that i can flick through, and then i can drag one out and place it on the map.
    Therefore i can't use the drag.target property of the MouseArea, because it prevents the Flickable from stealing the mouse event (but i need the Flickable to steal it in case i move the mouse vertically to flick instead of dragging). So i use onPositionChanged to match the position of the Item i drag to the position of the mouse manually.

    All this works so far, now on to my real problem:
    It is really hard to drag the Item out of the Flickable, because the mouse (and i imagine it will be even harder using your finger on a mobile device) must move exactly horizontally. A small divergence in vertical direction leads to flicking and calls the canceled signal of the MouseArea, which i use to reset the Item if the user wants to flick instead of dragging.
    So my question is: Is there a possibility to create something like an horizontal offset before the Flickable steals the mouse event. Or any other ideas how to make it easier to drag the Item out of the Flickable.

    Any ideas are highly welcome!

    Cheers .
    Alex

    Developer at Felgo - https://felgo.com/qt

    Develop mobile Apps for iOS & Android with Qt
    Develop Games with Qt

    Felgo is an official Qt Technology Partner

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved