main = new QMainWindow;
.....
QPushButton* tool = new QPushButton;
.................
 connect(tool,SIGNAL(clicked()),this,SLOT(change()));
................................
.........................
 time = new QDateTimeEdit;
.......................................
void testMainWindows::change()
{
    main->setWindowTitle(time->date().toString());
}
...........................
public slots:
void change();