Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Does Qt support the Clipboard API? How do I use it?
Forum Update on Monday, May 27th 2025

Does Qt support the Clipboard API? How do I use it?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 640 Views
  • 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.
  • A Offline
    A Offline
    Anon123
    wrote on last edited by Anon123
    #1

    [EDIT: I'm using Qt 6.2.4]

    I'm trying to use Clipboard.write() to push some data from my application to the user's clipboard. I have QWebEngineSettings::JavascriptCanAccessClipboard and even QWebEngineSettings::JavascriptCanPaste set to true.

    When I try to call navigator.clipboard.write() from JS loaded on the page, it throws an exception "Write permission denied".

    If I check with navigator.permissions.query() for clipboard-write, I get { state: "denied" }.

    How do I set that permission? MDN documentation linked above indicates it should be set automatically, although I don't know if "browser tabs" are a salient concept within the context of Qt. I haven't been able to find any additional knobs to turn by browsing the Qt documentation.

    Thanks in advance.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      redstoneleo
      wrote on last edited by
      #2

      A bug? https://bugreports.qt.io/browse/QTBUG-77450

      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