look up friend class in c++
http://www.cplusplus.com/doc/tutorial/inheritance.html
http://www.codersource.net/cpp_tutorial_friend.html
When you create the widget, there is a param of Parent. Set the param of parent equal to the first window
QWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
explicit QWidget::QWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
Constructs a widget which is a child of parent, with the name name and widget flags set to f.
If parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.
The name is sent to the QObject constructor.
The widget flags argument, f, is normally 0, but it can be set to customize the window frame of a top-level widget (i.e. parent must be 0). To customize the frame, set the WStyle_Customize flag OR'ed with any of the Qt::WidgetFlags.
If you add a child widget to an already visible widget you must explicitly show the child to make it visible.