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. QClipboard: setting only owner, not data

QClipboard: setting only owner, not data

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 514 Views 3 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.
  • G Offline
    G Offline
    giox069
    wrote on last edited by
    #1

    We are planning to port a GTK+ application to Qt.
    In GTK+ you can set the clipboard with a "owner": the system clipboard will never be loaded with real data, only with MIME type(s). When later the data will be really needed, for example when the user pastes it inside another application, a callback/signal to your application is called, and your application will build and provide the data.
    All is accomplished with the function gtk_clipboard_set_with_owner(). This should be the equivalent of X11 function XSetSelectionOwner(). Under windows you can use SetClipboardData() with a NULL handle, and your window will receive WM_RENDERFORMAT/WM_RENDERALLFORMATS message later to provide the data.

    Is there a similar pattern/usage for Qt?

    Thank you.

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

      Hi welcome to devnet,

      Based on the QClipboard documentation, it seems that you don't have the same options as in GTK+.

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

      A 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi welcome to devnet,

        Based on the QClipboard documentation, it seems that you don't have the same options as in GTK+.

        A Offline
        A Offline
        antenore
        wrote on last edited by
        #3

        @SGaist and? That's all? Do you know if there're any plans to implement this part? If not why? Your answer sound too conclusive to me. :-/
        If this is not the right channel, where we can discuss this thread more in depth?
        Thanks for your answers.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @antenore said in QClipboard: setting only owner, not data:

          Do you know if there're any plans to implement this part?

          Take a look at the bugtracker but I don't think so.

          If not why?

          Because nobody requested it for now and nobody provided a patch for it.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          A 1 Reply Last reply
          2
          • Christian EhrlicherC Christian Ehrlicher

            @antenore said in QClipboard: setting only owner, not data:

            Do you know if there're any plans to implement this part?

            Take a look at the bugtracker but I don't think so.

            If not why?

            Because nobody requested it for now and nobody provided a patch for it.

            A Offline
            A Offline
            antenore
            wrote on last edited by
            #5

            @Christian-Ehrlicher thanks! We will have a look.

            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