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. Rectangle containing a widget in a screen ( used to make a screenshot )

Rectangle containing a widget in a screen ( used to make a screenshot )

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

    Hello,
    Sorry to bug you again, i'd like to know if it is possible with Qt to get the rectangle which contains a widget in a screen, and the method works with any dimension of a screen.
    My objective is to take a screenshot of a QLabel (which contains an image) and the screenshot takes the good dimension if the image is changed.

    Thank you.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zeljko
      wrote on last edited by
      #2

      so, you want to make screenshoot from inside your application ?
      Use QPixmap::grabWidget to grab screenshoot of your QLabel into QPixmap, then do whatever with it.
      If you need to make screenshoot of specific part of the screen (not your application), then you can grab QDesktopWidget and then copy needed part into another QPixmap.

      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