-1

(http://api.kde.org/frameworks-api/frameworks5-apidocs/kidletime/html/kidletime_8cpp_source.html)

How can I find out the idle time of a KDE program using KIdleTime. It has function

int KIdleTime::idleTime() const

but just using

KIdleTime::idleTime()

gives compilation error "undefined reference"

1 Answers1

0

It's a member function, you need an instance to be able to call it.

The class is a singleton, which means there is an instance already created for you - see instance()

Alan Stokes
  • 18,815
  • 3
  • 45
  • 64