Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Detecting system resume event after suspend

    General and Desktop
    3
    7
    1909
    Loading More Posts
    • 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.
    • Talkless
      Talkless last edited by

      Hi,

      Is there a Qt-way to detect if application is now working again because system was resumed after suspend?

      QGuiApplication::applicationStateChanged notifies when you when simply activating window, so this does not help.

      QSessionManager-related functionality only handles session saving before closing user session, if I understand correctly.

      Since my use case currently targets only Windows, I guess I'll have to "simply" catch
      PBT_APMRESUMEAUTOMATIC
      Windows native event with QCoreApplication::installNativeEventFilter, but I still hope that I missed something in Qt for this purpose...

      Any ideas?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Talkless
        Talkless last edited by

        I have not found any alternatives, but to use QCoreApplication::installNativeEventFilter().

        Useful example: https://forum.qt.io/topic/69485/do-an-operation-when-computer-goes-to-sleep/3

        1 Reply Last reply Reply Quote 2
        • O
          ofmrew last edited by

          How did you get this to post? Every post I tried I get "Title must be longer than 3 characters" but there is no place to enter a title and no instructions. Sorry for barging in but, I am frustrated!!!!!!

          K 1 Reply Last reply Reply Quote 0
          • Talkless
            Talkless last edited by

            There is "Enter your title here" just above composing text box, above tool buttons. It is not visible as edit line, you just click on that text to start writing title.

            You should take screenshot and send bug report to Qt Website project (I guess) if you feel like it's something wrong.

            1 Reply Last reply Reply Quote 0
            • K
              koahnig @ofmrew last edited by mrjj

              @ofmrew

              Hi and welcome to devnet forum

              You go to the forum you like place your post. Press "New topic". As already described by @Talkless there is a place for a title line, but you need also add some more descriptions in the text box below of the menu line (B, I. andn a couple of symbols).

              [Pic added:Mrjj]
              alt text

              Vote the answer(s) that helped you to solve your issue(s)

              O 1 Reply Last reply Reply Quote 0
              • O
                ofmrew @koahnig last edited by

                @koahnig I want to thank you and Talkless for your help. I was able to post my question, but I am still mystified because what was presented today was not what I saw yesterday. I just had one window that had Enter tag at the bottom and a Ask a question button, there was no place to enter a title. I was as if only half of the window sequence was presented. No matter what I did I could not get past the Tags mus have more than three characters. I do not know if this contributed to the problem, but after I posted the message out of frustration, I tried to see if I got any response and the system was down due to an overload. Strange. It works now and it has the behavior I expected to see in the first place. You can mark this as resolved, but not the UHD monitor problem.

                K 1 Reply Last reply Reply Quote 0
                • K
                  koahnig @ofmrew last edited by

                  @ofmrew

                  It is hard to say what the potential cause of your problems where.

                  The only thing I have noticed is that I have trouble with posting in the forum when I have accessed some special webpages which are not cooperating with my browser (Chrome). I merely need to restart Chrome and the forum does work again. However, it fails also in replying to a post then.

                  In case you can replicate and describe the problem properly, you can file a bug report on JIRA.

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply Reply Quote 0
                  • Talkless
                    Talkless last edited by

                    I have not found any alternatives, but to use QCoreApplication::installNativeEventFilter().

                    Useful example: https://forum.qt.io/topic/69485/do-an-operation-when-computer-goes-to-sleep/3

                    1 Reply Last reply Reply Quote 2
                    • First post
                      Last post