Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QDrag - return status of action?

    General and Desktop
    2
    4
    280
    Loading More Posts
    • 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.
    • D
      Dariusz last edited by

      Hey

      When I process QDrop event, at the end of my functions I would like to set the status of QDrop event to either well... successful or failed so that the initial class that sends the event can then properly manage itself in case of true/false.

      How can I properly execute the drag.exec() event to get a result out of it?

      Or its something like

      drag.exec()
      drag->getResult() ?

      I don't see anything like that in QDrag /QMime so I wonder if I should subclass drag and add it... mhmm?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Did you check the return value of exec ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • D
          Dariusz last edited by

          How can I set the drag.exec return value?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            You don't set it. The exec method has a return value.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 2
            • First post
              Last post