Reputation: 55
I need to grab the screen or window in QNX 6.5.0 - 8 times per second. If use standart low-level API function PgReadScreen(), for resolution screen 1920x1080 (24 bit) its very slooow... When create context PdCreateDirectContext(), the driver blocks all other painting. It freezes the screen for a few seconds.
I also looked at the regions, but as I understood, they do not contain graphic data of windows?
Used Qt 5.7.1 with reduced functionality. For example, the function grabWindow() not implemented.
Good idea: use the widget's render() function, but some objects... for example: list of comboBox is widget too. I have to follow and draw it too.
Any ideas?
Upvotes: 1
Views: 490
Reputation: 98485
Window-grabbing is really simple. A top-level QWidget
(widget.isWindow()==true
) is backed by a QImage
backing store. Grabbing this requires no repainting or OS API calls. This answer has a working, mostly complete yet simple implementation of this idea. It should be portable to any platform and any widget as long as the raster backend is used.
Upvotes: 1