Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. [MacOS] Request/query permissions to take screenshot?
Forum Updated to NodeBB v4.3 + New Features

[MacOS] Request/query permissions to take screenshot?

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for python
2 Posts 2 Posters 507 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.
  • D Offline
    D Offline
    dynobo
    wrote on last edited by
    #1

    Hi everyone,

    by default, when I use QtGui.QScreen.grabWindow(my_screen, 0) on MacOS, I receive an image of the empty desktop.
    I learned, that I have to grant my application "Screen Recording" permissions in the system settings, then I receive the "real" screenshot correctly.

    But for my users, this is quite a pitfall, so I'm looking for a user friendly solution.

    1. Is there any way I could trigger a "request for permission" from my application? I noticed, other applications do this. (Shouldn't this behavior be the default for Qt?)
    2. If this is not possible, can I somehow query, if my applications is missing those permissions? Then I could at least open a pop-up with instructions...

    Thanks and best regards!

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @dynobo said in [MacOS] Request/query permissions to take screenshot?:

      "Screen Recording" permissions

      https://apple.stackexchange.com/questions/384230/how-do-i-reset-screen-recording-permission-on-macos-catalina
      if the command works, you can run it in a qt process.

      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