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. take a screenshot of arbitrary region of screen.

take a screenshot of arbitrary region of screen.

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

    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?

    FlotisableF 1 Reply Last reply
    0
    • S samdol

      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?

      FlotisableF Offline
      FlotisableF Offline
      Flotisable
      wrote on last edited by
      #2

      @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
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved