Then look for "C++ GUI Programming with Qt4". The Qt3 version of this book is available for download, but I'm not sure if you can download the Qt4 edition too.
QWidget::show() is a non-blocking call and because you create frm2 on the stack it gets destroyed as soon as it goes out of scope.
http://doc.trolltech.com/4.1/qdialog.html#return
Bookmarks