Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved take a screenshot of arbitrary region of screen.

    General and Desktop
    2
    2
    456
    Loading More Posts
    • 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.
    • S
      samdol last edited by

      Hi,
      I found that we can take a screenshot by
      http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
      But this example shows how to take a whole desktop screen.
      I would like to draw a rectangle on desktop screen and take a screenshot only inside of this screen shot. Is it possible?

      Flotisable 1 Reply Last reply Reply Quote 0
      • Flotisable
        Flotisable @samdol last edited by

        @samdol
        I think it's possible.

        In the example, it use grabWindow to get the pixmap of screen int shootScreen slot. From the document, you can set a rectangle to specify where you want to grab.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post