Drag and drop mechanism implementation problem



  • Hello,

    I have a simple task for which I am not able to find a solution. Basically, on my screen I have a main menu on the left that contains a tree view and a workspace which fills the rest of the screen. I want to implement drag and drop mechanism where the user selects item from the tree view (using press and hold), drags the newly created component above the workspace and drops it there. I need to mention that the workspace has a grid for snapping so I have to be able to know where the component was released, relative to the grid. The problem arises with the mouse areas of both the tree view and the workspace which essentially is a rectangle. My app catches the onPressAndHold event on the tree view, but I can't find a way to catch the release event on the workspace.

    Thank you in advance



  • Hi,
    Have you tryed to use "Connections" type to catch the release event on the workspace ?

    LA


Log in to reply
 

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