Is it possible to drag and drop application window that was launched seperated from Pyqt script?
-
I want to create a GUI that has space for an external application window and then manually launch that external application and drag it inside the GUI.
It's like the following thread: https://stackoverflow.com/questions/41474647/run-a-foreign-exe-inside-a-python-gui-pyqt
except I'm dragging the calculator window to embed it inside the GUI. Is it even possible?I tried to look around (tried chatGPT as well but didn't get any useful hints so far) and most of the examples available using "QMimeData" that support (text/url/image), so the dragged type of data is not accepted. (If I understood correctly)
So any suggestion for a different way to do that? Or maybe try a different platform that has this capability? Since I'm trying to learn the tool for that function only. -
@Bolbol2017
That example shows how to embed an application spawned from itsHWND
. That is the approach you would need. I have not heard of "dragging an application to embed it into another". You would need to get the dragged application'sHWND
to do similar, I don't know how you would get at that from a drag. -
@JonB So what I should look for is getting HWND from a dragged item and using the example from StackOverflow, correct?
What also about this case:
- I launch the application and window X showed.
- I selected the working path directory and then the window Y showed (which is the actual application)
This is my actual workflow but I thought about this dragging approach because even If I showed the application by its HWND, window Y will be launched outside the GUI because of the different HWND (or my guess is wrong?)
But anyway, do you think my desired workflow is doable?