The countdown procedure written in QT can be used for different purposes according to the specified time. To create a simple GUI project for QT, modify the main.cpp.
Copy Code code as follows:
#include <QApplication>
#include <QLabel>
#include <QDate>
#include <QLayout>
int main (int argc, char *argv[])
{
Qapplication A (argc, argv);
Qlabel *label = new Qlabel;
Qdate currentdate = Qdate::currentdate ();
Qdate Kaoyanri (2015,1,7);
Qint64 Tianshui = Currentdate.daysto (Kaoyanri);
QString Tianshu = Qstring::number (Tianshui);
QString string ("from the Postgraduate and <font color= ' red ';><b>");
QString Tian ("</b></font> Day");
String = string + Tianshu + Tian;
Label->settext (string);
Label->setwindowtitle ("Grind Down the Countdown");
Qfont font;
Font.setpointsize (30);
Label->setfont (font);
Label->resize (300,43);
Label->show ();
return A.exec ();
}