View Single Post
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
Originally Posted by krk969 View Post
Hello people,

Ive just begun my journey with QT on the maemo5 SDK.
Thought Id first try a battery percentage app and then later convert it to a desktop widget.

Im attaching the app here.

Need your help and suggestions here with it.

the app when I try running in the N900 emulator,

1. the progress bar displays 80 first, then 70,60,30,10.
Couldnt figure out why it doesnt go in steps of 10 as ive programmed it, is there some delay while using signals ?

2. as stated in my comments int he code, ive used a simple while loop to simulate the battery percentage value, anyone can suggest an mechanism where i can get an interrupt or signal when the battery percentage value changes ?
I dont want to resort to periodically polling the value returned by lshal | grep percentage, im sure there are better ways.

thanks for any help...
reattached the code files with some formatting, had copied it directly from unix to windows
Attached Files
File Type: txt qprogress.cpp.txt (1.4 KB, 230 views)
File Type: txt qprogress.hpp.txt (643 Bytes, 162 views)