sax94
27th April 2012, 15:43
hello everybody
I'm creating a simple application that should be a 7 segment clock, everything works ok when I try this codesnippet
QString hour=QString::number(time.currentTime().hour());
QString min=QString::number(time.currentTime().minute());
QString sec=QString::number(time.currentTime().second());
scene->clear();
for(int i=0;i<6;i++)
{
if(i%2==0 && i>0)
this->designPoints(i);//I design the dots so that the clock looks something like this 00:00:00
QString appoggio;
if(i==0 || i ==1)
appoggio=ImpostaAppoggio(i,hour);//sets the value of appoggio
if(i==2 || i==3 )
appoggio=ImpostaAppoggio(i,min);
if(i==4 || i ==5)
appoggio=ImpostaAppoggio(i,sec);
DisegnaNum(appoggio,i);//I design the seven segments
but when I try this
for(int j=0;j<1000;j++)
{
QString hour=QString::number(time.currentTime().hour());
QString min=QString::number(time.currentTime().minute());
QString sec=QString::number(time.currentTime().second());
scene->clear();
for(int i=0;i<6;i++)
{
if(i%2==0 && i>0)
this->designPoints(i);
QString appoggio;
if(i==0 || i ==1)
appoggio=ImpostaAppoggio(i,hour);
if(i==2 || i==3 )
appoggio=ImpostaAppoggio(i,min);
if(i==4 || i ==5)
appoggio=ImpostaAppoggio(i,sec);
DisegnaNum(appoggio,i);
}
}
no errors or warning occur but no window is showing up and I can't figure out what's going wrong! can someone help?
thank's
I'm creating a simple application that should be a 7 segment clock, everything works ok when I try this codesnippet
QString hour=QString::number(time.currentTime().hour());
QString min=QString::number(time.currentTime().minute());
QString sec=QString::number(time.currentTime().second());
scene->clear();
for(int i=0;i<6;i++)
{
if(i%2==0 && i>0)
this->designPoints(i);//I design the dots so that the clock looks something like this 00:00:00
QString appoggio;
if(i==0 || i ==1)
appoggio=ImpostaAppoggio(i,hour);//sets the value of appoggio
if(i==2 || i==3 )
appoggio=ImpostaAppoggio(i,min);
if(i==4 || i ==5)
appoggio=ImpostaAppoggio(i,sec);
DisegnaNum(appoggio,i);//I design the seven segments
but when I try this
for(int j=0;j<1000;j++)
{
QString hour=QString::number(time.currentTime().hour());
QString min=QString::number(time.currentTime().minute());
QString sec=QString::number(time.currentTime().second());
scene->clear();
for(int i=0;i<6;i++)
{
if(i%2==0 && i>0)
this->designPoints(i);
QString appoggio;
if(i==0 || i ==1)
appoggio=ImpostaAppoggio(i,hour);
if(i==2 || i==3 )
appoggio=ImpostaAppoggio(i,min);
if(i==4 || i ==5)
appoggio=ImpostaAppoggio(i,sec);
DisegnaNum(appoggio,i);
}
}
no errors or warning occur but no window is showing up and I can't figure out what's going wrong! can someone help?
thank's