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. Is it possible to drag and drop application window that was launched seperated from Pyqt script?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to drag and drop application window that was launched seperated from Pyqt script?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 379 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.
  • B Offline
    B Offline
    Bolbol2017
    wrote on last edited by Bolbol2017
    #1

    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.

    JonBJ 1 Reply Last reply
    0
    • B Bolbol2017

      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.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Bolbol2017
      That example shows how to embed an application spawned from its HWND. 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's HWND to do similar, I don't know how you would get at that from a drag.

      B 1 Reply Last reply
      0
      • JonBJ JonB

        @Bolbol2017
        That example shows how to embed an application spawned from its HWND. 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's HWND to do similar, I don't know how you would get at that from a drag.

        B Offline
        B Offline
        Bolbol2017
        wrote on last edited by Bolbol2017
        #3

        @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?

        1 Reply Last reply
        0

        • Login

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