Mike
Mike

Reputation: 302

Qt: Screen Shot

I have 3 QLabels of 1024x512 over one another (as QPixmaps). The bottom layer receives RGB datastream, the second layer receives RGBA datastream (so opacity can be turned down to see the bottom layer), and finally the third layer is an annotation overlay to be drawn on. I am trying to create a save out image of what the user is currently looking at in the window (not the full screen) at the time of the call. Any help or directions to look down (classes, members, examples, etc.) would be much appreciated.

Upvotes: 2

Views: 296

Answers (1)

Mike
Mike

Reputation: 302

Solved it myself...

QScreen *This_Screen = QGuiApplication::primaryScreen();
This_Pixmap = This_Screen->grabWindow(QWidget::winId(),x,y,1024,512);

Upvotes: 2

Related Questions