But every time the timer event is getting called , a new thermometer instance is getting created and new range is being set. U ca find it in this piece of code.
void timerEvent(QTimerEvent *)
{
timeLayout->addWidget(new ValueBar(o1, "Time Factor",timeBox));
d_timethermo->setValue(sri);
cout<<"srii:::::::::::" << sri <<endl;
info->show();
update();
sri = sri+10;
}
here I am incrementing the value of sri by 10.
this incremented value is set as range .
//
d_timethermo->setRange(0,sri);
with your code from the first post I can not see anything (segmentation fault)
because of: d_timethermo->setFillColor(QColor("DarkMagenta"));
at a time where d_timethermo has not been created
other thing: why do you need to create a new thermometer each time timerEvent is called?
I think better is to create ValueBar in SysInfo creator (see attached)
Nicolas
This post has been edited 3 times, last edit by "Nicolas SOUCHON" (May 10th 2008, 8:26am)