[Please indicate the source of the post: blog.csdn.net/lanmanck]
It is interesting to embed a child window into the parent window. For example, we use this method to easily implement each interface in the common software installation dialog box. If there is only one form, the control will crash.
VC-MFC can also be implemented, please refer to thisArticle: Http://blog.csdn.net/lanmanck/archive/2009/02/02/3857896.aspx
It can also be implemented in QT, but it is actually very simple. Take qt4.5.2 and qt4.7.0 as examples.
1. Create a new window in the current project and inherit from qdialog or qwidget.
2. Create this window: F2 = New Form2(This);
3. Add this sentence to the new window constructor: setwindowflags(Qt::Customizewindowhint|Qt::Framelesswindowhint); Hide ();
You can also use move to a proper position. This position is relative to the parent window, rather than the desktop or other windows.
4. In the parent window, call show () of the Child Window.