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. Taking a complete screenshot in Qt. How?
Forum Update on Monday, May 27th 2025

Taking a complete screenshot in Qt. How?

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

    I am trying to take a screenshot in Qt. I used the sample screenshot program that is included. (It is here: https://doc.qt.io/qt-6/qtwidgets-desktop-screenshot-example.html, code is here: https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/desktop/screenshot?h=6.7)

    But it is only taking a screenshot of the Qt app along with the desktop background. It is not taking a screenshot of what is actually on screen. How do I remedy this?

    I tried to do this as well using the native Mac OS API, and that had the same result.

    I set the permissions properly, I believe, to permit these programs to screen record in Mac OS system preferences.

    Any help is appreciated. Thank you.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nownownow_87
      wrote on last edited by
      #2

      I think it's a permissions issue because when I run the executable directly from the terminal then the screenshots function as they should. Otherwise if I call " open screenshot.app " it asks for permission and even after I give it screen capture permission it only screen captures the current screen

      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