Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to prevent the computer going to sleep within a QT application.
Forum Updated to NodeBB v4.3 + New Features

How to prevent the computer going to sleep within a QT application.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheFlyingMooseMan
    wrote on last edited by
    #1

    For OS X, it is easy -- the code under Listing 3 works:
    (https://developer.apple.com/library/content/qa/qa1340/_index.html)

    I need a solution for both Windows and Linux.
    Does anyone have any pointers or references?

    Any help is greatly appreciated.

    Thanks,
    Roy

    jsulmJ A 2 Replies Last reply
    0
    • T TheFlyingMooseMan

      For OS X, it is easy -- the code under Listing 3 works:
      (https://developer.apple.com/library/content/qa/qa1340/_index.html)

      I need a solution for both Windows and Linux.
      Does anyone have any pointers or references?

      Any help is greatly appreciated.

      Thanks,
      Roy

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @TheFlyingMooseMan This is clearly out of scope of Qt.
      But maybe someone knows...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      3
      • jsulmJ jsulm

        @TheFlyingMooseMan This is clearly out of scope of Qt.
        But maybe someone knows...

        T Offline
        T Offline
        TheFlyingMooseMan
        wrote on last edited by
        #3

        @jsulm I tend to respectfully disagree, after all, it is one of many aspects of an application, but then, at the same time, maybe some else knows.

        1 Reply Last reply
        0
        • T TheFlyingMooseMan

          For OS X, it is easy -- the code under Listing 3 works:
          (https://developer.apple.com/library/content/qa/qa1340/_index.html)

          I need a solution for both Windows and Linux.
          Does anyone have any pointers or references?

          Any help is greatly appreciated.

          Thanks,
          Roy

          A Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @TheFlyingMooseMan This is most definitely outside the scope of Qt... But here is a few ways to do it with linux:

          https://stackoverflow.com/questions/31498114/how-to-programatically-prevent-linux-computer-from-sleeping-or-turning-on-screen

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          3

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved