Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] QSystemScreenSaver

[SOLVED] QSystemScreenSaver

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 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.
  • B Offline
    B Offline
    borut123
    wrote on last edited by
    #1

    I'm trying to stop the screensaver when my app is in the foreground.
    (http://wiki.forum.nokia.com/index.php/Inhibiting_the_screen_saver)

    I followed the code snippet from the link above, but still, I'm getting compile errors 'QSystemScreenSaver' does not name a type.

    I use Qt SDK 1.1 beta on Windows 7.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      miksuh
      wrote on last edited by
      #2

      The compiler can't find QSystemScreenSaver class declaration. Make sure your code has include line like this before using QSystemScreenSaver class:

      @#include <QSystemScreenSaver>@

      You also need to specify QtMobility namespace, that blog article does not mention it for some reason, so make sure there is a macro line like this after the include line:

      @QTM_USE_NAMESPACE@

      Make also sure you have lines like this in your .pro file

      @CONFIG += mobility
      MOBILITY += systeminfo@

      1 Reply Last reply
      0
      • B Offline
        B Offline
        borut123
        wrote on last edited by
        #3

        tnx, it works now.

        1 Reply Last reply
        0

        • Login

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