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. Qt dual monitor screenshot weirdness
Qt 6.11 is out! See what's new in the release blog

Qt dual monitor screenshot weirdness

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 422 Views 1 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.
  • F Offline
    F Offline
    firewalker
    wrote on last edited by firewalker
    #1

    I have a problem with a program using Qt to screenshot. I order to try and solve it my self, I had a look to the screenshot example:

    https://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html

    Downloading and compiling the program, it works but only for the individual screens. In another post

    https://forum.qt.io/topic/65813/screenshot-secondary-monitor

    I saw that the line

     screen->grabWindow(0);
    

    Should be change to

    originalPixmap = screen->grabWindow(0, screen->geometry().x(), screen->geometry().y(), screen->size().width(), screen->size().height());
    

    With this change when the program is moved to the secondary monitor; captures it just fine.

    https://i.imgur.com/VrzobmH.png

    When moved to the primary monitor it just capture only a part of the screen and not the entire two monitors. The produced image has the dimensions of the primary monitor.

    https://i.imgur.com/sVDTe2U.png

    Exactly the same issue I have with the software I need to use.

    This is my monitor configuration:

    https://i.imgur.com/LPneEcO.png

    And this is my entire desktop capture with KDE Spectacle.

    https://i.imgur.com/DOCmdrG.jpg

    What could be the issue?

    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