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/Drop virtual item outside of application
Forum Updated to NodeBB v4.3 + New Features

Drag/Drop virtual item outside of application

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 488 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.
  • T Offline
    T Offline
    Taytoo
    wrote on last edited by Taytoo
    #1

    Lets assume I have a widget that is displaying some virtual item e.g. an image that was generated in the program, or contents of a zip file, or list of files over a slow network share. That actual image/file on disk doesn't exist on this computer. When a user drags the item and drops it on e.g. desktop. How does that work?

    I'd also like to do some extra processing before actually dropping the file e.g.

    1. User starts dragging [It's treated as a file and CopyAction]
    2. User drops the item on Desktop
    3. At that point, I need to Prompt the User in my application about Export format etc.
    4. User can cancel or select a format.
    5. Create the file on desktop with selected format.

    Essentially, I want to delay processing virtual item until the user actually drops it somewhere. How do I handle that event in my application?

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

      Hi,

      There used to be the Delayed Encoding example that might give you some ideas but IIRC it was not working on all platforms.

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

      T 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        There used to be the Delayed Encoding example that might give you some ideas but IIRC it was not working on all platforms.

        T Offline
        T Offline
        Taytoo
        wrote on last edited by
        #3

        @SGaist You saved me a lot of heartache! Can you recall which platforms it worked fine on? Probably windows and mac?

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

          From (very old) memory, it think the one having issues was OS X.

          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
          0

          • Login

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