Limit Drag And Drop Vertically

  • Hi,

    Currently, I have created multiple widgets stacked on top of one another. I am looking to allow a user to drag and drop the upper most widgets (I have read the drag and drop docs here: and I think I can do it). I basically made my own QSlider (vertical), but instead of only having one item to slide up and down along the plane, there are 3.

    The one issue is, I would like to limit the dragging only only vertically (i want to make the horizontal x value static and unchangeable when dragging). Just like a QSlider works, and all 3 items will stay on the plane of the background slider line.

    Does anyone know how I can do this using the mouseevent override during the drag and drop operation?

    Thank you!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.