Dear all,

I would like to create an button that once you click, it pop up another clock program that display the times.

My program is something like this

QToolButton * mybutton2 = new QToolButton(this);
mybutton2->setIcon(QIcon("/shihao/qicon/clock.JPG"));
mybutton2->setText("Sample text");
mybutton2->setToolButtonStyle(Qt::ToolButtonIconOnly);
mybutton2->setIconSize(QSize(50,80));
mybutton2->setGeometry(490, 70, 95, 100);
mybutton2->setAutoRaise(1);

connect(mybutton2, SIGNAL(clicked()), qApp, SLOT(quit()));
What should I do in order to connect to another program? what should I replace with the quit() function? Where should I put the clock program? should be inside the same cpp file or should be the same directory?

Thanks in advance.