Results 1 to 2 of 2

Thread: finish transmission at screen lock windows 10

  1. #1
    Join Date
    Mar 2014
    Location
    USA
    Posts
    85
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default finish transmission at screen lock windows 10

    I found how to capture the event when the computer goes into screen lock. At that time I need to send a signal to the server. The program suspends before the data can be sent. It's a small message, probably about 10 bytes. Using qDebug, I can see that line of code is being executed at screen lock, but the data isn't making it. How can I keep it running long enough to finish the transmission?

  2. #2
    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: finish transmission at screen lock windows 10

    Quote Originally Posted by TonyInSoMD View Post
    I found how to capture the event when the computer goes into screen lock. At that time I need to send a signal to the server. The program suspends before the data can be sent. It's a small message, probably about 10 bytes. Using qDebug, I can see that line of code is being executed at screen lock, but the data isn't making it. How can I keep it running long enough to finish the transmission?
    A screensaver activating should not stop your program from running, so I assume you mean the machine is going to some lower power state (Windows, WM_POWERBROADCAST PBT_APMSUSPEND event?). The bytes queued for transmission will not be sent until the Qt message loop is reached, at which time the program may also respond to the suspend request. At a guess, you could try explicitly calling CoreApplication::processEvents() after queuing the bytes to send but before returning control to the main loop.

Similar Threads

  1. QUdpSocket transmission
    By Slavius in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2017, 06:48
  2. Lock screen orientation
    By patrikd in forum Qt Quick
    Replies: 2
    Last Post: 1st November 2014, 13:11
  3. Lock screen after inactivity time
    By baobui in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 20th March 2011, 22:18
  4. Lock Screen
    By ahmdsd_ostora in forum Qt Programming
    Replies: 16
    Last Post: 11th July 2010, 09:55
  5. appbar: allocate screen space (dock and lock)
    By mito in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2007, 18:39

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.