Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Drag and Drop when source is deleted
Forum Updated to NodeBB v4.3 + New Features

Drag and Drop when source is deleted

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 533 Views 1 Watching
  • 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.
  • Z Offline
    Z Offline
    zonman
    wrote on last edited by
    #1

    Hello, I have a few widgets with plots and drag and drop system. But program crashes, while I am dragging and then receive plots-update (delete and create new) - so QDragMoveEvent is called on null plot-object.
    Are there some ideas, how to check before drag event or stop dragging?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Wouldn't be safer to block updates while doing the drag and drop operation ?

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

      Z 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Wouldn't be safer to block updates while doing the drag and drop operation ?

        Z Offline
        Z Offline
        zonman
        wrote on last edited by
        #3

        @SGaist Hi, thank you for reply
        No, in my situation. Program has interactive mode, when plots are updated every period, so user need to have opportunity use drag and drop at this time, by requirements
        So I try to find some way to recreate drag and drop or just add check

        SGaistS W 2 Replies Last reply
        0
        • Z zonman

          @SGaist Hi, thank you for reply
          No, in my situation. Program has interactive mode, when plots are updated every period, so user need to have opportunity use drag and drop at this time, by requirements
          So I try to find some way to recreate drag and drop or just add check

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @zonman why do you need to delete anything on update ?

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

          Z 1 Reply Last reply
          0
          • Z zonman

            @SGaist Hi, thank you for reply
            No, in my situation. Program has interactive mode, when plots are updated every period, so user need to have opportunity use drag and drop at this time, by requirements
            So I try to find some way to recreate drag and drop or just add check

            W Offline
            W Offline
            wrosecrans
            wrote on last edited by
            #5

            @zonman Don't delete stuff that is in use.

            The fact that the use is drag and drop doesn't effect the underlying design issue. You don't do anything to preserve the lifetime of something when you still need it. There's not going to be a flag for the drag and drop API that will let it access stuff that has been deleted.

            1 Reply Last reply
            1
            • SGaistS SGaist

              @zonman why do you need to delete anything on update ?

              Z Offline
              Z Offline
              zonman
              wrote on last edited by
              #6

              @SGaist @wrosecrans, this program is a submodule , which gets external data to update. So I remove old plots and move another. There is main problem in existing connections with drag and drop
              But if there is no way to "reconnect drag and drop" from deleted widget, okay, thank you for help

              1 Reply Last reply
              0
              • Z zonman has marked this topic as solved on
              • Z zonman has marked this topic as unsolved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved