Results 1 to 4 of 4

Thread: Screenshot

  1. #1
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Screenshot

    Hi

    His there a way to make a Qt application take screenshots of herself (without system calls)?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Screenshot


  3. The following user says thank you to Lykurg for this useful post:

    graciano (19th April 2009)

  4. #3
    Join Date
    Apr 2009
    Posts
    5
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Screenshot

    Something like this:
    Qt Code:
    1. QDesktopWidget *w = QApplication::desktop();
    2. QPixmap screenshot = QPixmap::grabWindow(w->screen()->winId());
    To copy to clipboard, switch view to plain text mode 

    This takes a screenshot of the desktop.
    Last edited by nirva; 19th April 2009 at 16:26. Reason: spelling error

  5. The following user says thank you to nirva for this useful post:

    graciano (19th April 2009)

  6. #4
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Screenshot

    Thanks ... i will try that.

    Here is a good example: http://doc.trolltech.com/4.5/desktop-screenshot.html
    Last edited by graciano; 19th April 2009 at 17:50.

Similar Threads

  1. Printing Screenshot -> poor quality
    By MarcSchubert in forum Qt Programming
    Replies: 2
    Last Post: 14th May 2007, 10:48
  2. QDesktopWidget Screenshot && Mouse grab
    By patrik08 in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2007, 10:51

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.