PDA

View Full Version : Displaying temprature.



Niamita
9th August 2011, 10:46
Hi
how to display temprature in application , i have an gui application now i have to show temprature in this gui app. I do not find any class/api regarding this.
Please help me.
Thanks.

Talei
9th August 2011, 10:56
Three options off the top of my head (this is for graphical/visualization, not QLabel->setText(), approach):
1. Use any lightweight GUI element like line, widget maybe and use QStyleSheet to customize view of that element to Your needs (i.e. if You have some graphics put them in there)
2. QLabel and place image corresponding to the current temperature value that
3. Use QWidget and paint it Yourself in paint() event

to simply display in GUI use i.e.
QLabel().setText(QString("%1").(int curTemp));

Niamita
9th August 2011, 10:59
i have to fetch temprature, how it can do.

meazza
9th August 2011, 11:03
Temperature of what and from where?

marcvanriet
9th August 2011, 11:24
If your device has a camera or a web cam, you could use openCV and then the algorithm described here : Wheather rock (http://en.wikipedia.org/wiki/Weather_Rock)