Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81918

QClipboard: setting only owner, not data

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.0, 5.14.1
    • QPA, QPA: Windows, QPA: X11/XCB
    • None
    • Linux/X11

    Description

      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?

      The original question was posted here: https://forum.qt.io/topic/105892/qclipboard-setting-only-owner-not-data

       

      Thanks!

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              antenore Antenore Gatta
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes