Drag and Drop when source is deleted
-
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? -
Hi,
Wouldn't be safer to block updates while doing the drag and drop operation ?
-
@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 -
@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 -
@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@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.
-
@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 -
Z zonman has marked this topic as solved on
-
Z zonman has marked this topic as unsolved on