The diplay is only “.yyyy” or “dd.mm” ….all the six digits are not displayed . PLEASE review the given code …………
#include<lcdtd.h>
#include<QtGui>
lcdtd::lcdtd(QLCDNumber *parent):QLCDNumber(parent)
{
setWindowTitle("Time And Date");
QTimer *timer = new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(showtime()));
timer->start(1000);
resize(200,200);
}
void lcdtd::showtime()
{
QDate time = QDate::currentDate();
QString text= time.toString("dd.MM.yyyy");
this->display(text);
}
↧