Results 1 to 3 of 3

Thread: Don't redraw desktop, use a screenshot instead.

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Don't redraw desktop, use a screenshot instead.

    Hey everybody!

    I am trying to build a simple application in Qt. It is supposed to show a message every x ms.

    In order to increase speed, (it's really discomforting as it is right now) i thought of taking a screenshot before makinng my message visible, and then (and that's the part i don't know how to implement) i want to somehow tell Windows(and also Ubuntu) not to redraw the desktop but use my screenshot instead.

    Any ideas?

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Don't redraw desktop, use a screenshot instead.

    You can make a full screen widget and place the screenshot as its background but then:
    1. changes to the desktop will not be visible
    2. I don't think you will gain any speed as parts of the widget will still have to be redrawn

    The desktop should redraw only this part of itself which is obscured by your "message". I suggest you profile your application to see why a slowdown occurs.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    danciac (8th September 2010)

  4. #3
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Don't redraw desktop, use a screenshot instead.

    Thanks for the tips. I'll look more into profiling.

Similar Threads

  1. QT Desktop Screenshot not working
    By harleyskater in forum Qt Programming
    Replies: 11
    Last Post: 27th June 2010, 04:25
  2. Take a screenshot and convert it to PNG but FAST !
    By fitzy in forum Qt Programming
    Replies: 11
    Last Post: 4th November 2009, 08:20
  3. Take a screenshot of a QGraphicsRectItem
    By yazwas in forum Qt Programming
    Replies: 1
    Last Post: 12th October 2009, 13:14
  4. Screenshot
    By graciano in forum Qt Programming
    Replies: 3
    Last Post: 19th April 2009, 16:32
  5. Replies: 5
    Last Post: 31st January 2009, 07:36

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
  •  
Qt is a trademark of The Qt Company.