Results 1 to 1 of 1

Thread: Screenshot example doesn't work on Mac OSX

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Screenshot example doesn't work on Mac OSX

    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:

    Qt Code:
    1. CGImageRef windowImage = CGWindowListCreateImage(imageBounds, singleWindowListOptions, windowID, imageOptions);
    2. originalPixmap = new QPixmap(QPixmap::fromMacCGImageRef(windowImage));
    To copy to clipboard, switch view to plain text mode 
    Last edited by Damiano; 19th January 2011 at 15:12.

Similar Threads

  1. Example in Qt labs doesn't work
    By matko in forum Newbie
    Replies: 1
    Last Post: 19th November 2009, 18:59
  2. QNetworkAccessManager doesn't work
    By Floppy in forum Newbie
    Replies: 7
    Last Post: 14th November 2009, 16:32
  3. Privoxy doesn't work with qt 4.5.1
    By doep in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2009, 10:55
  4. setTabStopWidth doesn't work
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 19th November 2007, 08:29
  5. setMouseTracking() doesn't work.
    By luffy27 in forum Qt Programming
    Replies: 13
    Last Post: 27th April 2007, 18:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.