To avoid display off, Maemo is providing DBUS API using which you can disable display off.
Following is Qt code to send dbus call to disable display off. You need to call this method at least once in every 60 seconds to avoid display off.
You will also need to include "mce/mode-names.h","mce/dbus-names.h" and "QtDBus" headers and add dbus support in Qt's pro file.
I hope this will help to someone facing similar problem.