Results 1 to 5 of 5

Thread: How to send the PC to standby or hibernation?

  1. #1
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question How to send the PC to standby or hibernation?

    Hi,

    Any idea? Is there any library for this?
    I saw that there is a so called POWRPROF extension in MSDN, but I don't know how to use it in QT.
    Do you have any suggestion?

    Thanks!

  2. #2
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to send the PC to standby or hibernation?

    It's a dll,so I guess you should take a look at QLibrary.
    It's not the goodbye that hurts,but the flashback that follow.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to send the PC to standby or hibernation?

    I don't expect Qt has anything to directly address this requirement.

    There will be a Windows-specific API call that you use on Windows in the same way that MSDN does. It will also likely vary between Win XP and Vista/Win 7 (usually a bunch of extra calls to sort security).

    I assume that there is an equivalent on Mac, and probably no standard way on Linux.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to send the PC to standby or hibernation?

    Under Windows, you can try SetSystemPowerState

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

    falconium (8th March 2011)

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

    Default Re: How to send the PC to standby or hibernation?

    Quote Originally Posted by ChrisW67 View Post
    I assume that there is an equivalent on Mac, and probably no standard way on Linux.
    You underestimate the power of Tux You can either call an appropriate command (like hibernate) through QProcess or use /sys/power interface or make a direct call to HAL through DBus.
    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.


Similar Threads

  1. Standby / hibernate system events
    By rensdenobel in forum Qt Programming
    Replies: 0
    Last Post: 13th October 2008, 17:39
  2. How many bytes did i send?
    By yagabey in forum Qt Programming
    Replies: 3
    Last Post: 24th January 2008, 10:12
  3. send signal from 1 gui to another gui
    By tho97 in forum Qt Programming
    Replies: 3
    Last Post: 5th December 2007, 21:21
  4. how to send file with qt c++?
    By wei243 in forum Qt Programming
    Replies: 5
    Last Post: 3rd March 2007, 09:32

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.