var vbox=new QVBox(); var te=new QTimeEdit(vbox); var okButton=new QToolButton(vbox); okButton.text="Ok"; function TimeChanged(q) { alert("Time Changed: " +q); } vbox.connect(te, "valueChanged(const QTime&)", this, "TimeChanged"); vbox.connect(okButton, "clicked()", this, "exit"); vbox.show(); application.exec();