A simple dialog and a button are created with the following code:
QDialog d; QPushButton b("Hello", &d); d.setWindowFlag(Qt::WindowStaysOnTopHin