[SOLVED] QSystemScreenSaver



  • 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.



  • 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@



  • tnx, it works now.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.