Hello.
I'm using SnowLeopart and Qt Designer. I have to write grabscreen application. There is desktop/screenshot example in Qt examples, but it doesn't work on Mac (first time screenshot is black, next is always blue). This example use QPixmap::grabWindow, is there any other way to do this?
Thanks,
Damiano
EDIT1:
Solved, use:
CGImageRef windowImage = CGWindowListCreateImage(imageBounds, singleWindowListOptions, windowID, imageOptions);
originalPixmap
= new QPixmap(QPixmap::fromMacCGImageRef(windowImage
));
CGImageRef windowImage = CGWindowListCreateImage(imageBounds, singleWindowListOptions, windowID, imageOptions);
originalPixmap = new QPixmap(QPixmap::fromMacCGImageRef(windowImage));
To copy to clipboard, switch view to plain text mode
Bookmarks