Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. It's possible to change defaultDropAction during drag?
Qt 6.12 LTS is out! See what's new in the release blog

It's possible to change defaultDropAction during drag?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qdrag drag drop
1 Posts 1 Posters 678 Views
  • 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.
  • C Offline
    C Offline
    calanor
    wrote on last edited by
    #1

    In drag->exec I decide the supportedActions and the defaultDropAction ( ...action will be proposed when the user performs a drag without using modifier keys).

    But I need over some widgets to change the defaulDropAction in dragEnterEvent or dragMoveEvent while still allowing the user to force the other supportedActions actions using modifier keys.

    There is no setDefaultDropAction in event class or similar.

    How could I do this?

    This is my first post,
    Thank you all in advance.

    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
    • Unsolved