To Drag and Drop setDropAction(Qt::moveAction) in dragMoveEvent and dragEnterEvent is not necessary.



  • I've tested a project for Drag and Drop but when i dont write
    @setDropAction(Qt::moveAction)@
    in
    @dragMoveEvent(...)@
    and
    @dragEnterEvent(...)@

    project still work, i saw many projects with this line and i dont know why a professional programmer write this code?(you can see many examples that wrote this line in their code)


Log in to reply
 

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