<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I've read that thing about the signals/slots and that was exactly what I was trying to do (at least I thought that was exactly what they said). Here's an example from a Qt Address Book tutorial:<br><br> connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));<br><br>As the QMessageBox needs a parent reference, 'this' is fine for the MainWindow. This is my slot:<br><br>QObject.Connect(btnAbout, Qt.SIGNAL("clicked()"), mainwin, 
Qt.SLOT("ShowAbout(mainwin, page)"));<br><br>First, the Qt one doesn't have these " ", so I thought it might be a Qyoto thing. 'this' is a reference to MainWindow. In my StartWindow, 'mainwin' is a reference to the MainWindow. If I use a slot in MainWindow I pass the slot a 'this' reference as in the example. If I use a slot in the StartWindow I pass it a reference to MainWindow as 'mainwin'.<br><br>Are you saying if I declare the SecondWindow class as inherited from :QWidget I should then pass the reference to itself as 'this' rather than a reference to the MainWindow?<br><br>In the StartWindow the QMessageBox also needs a parent reference, that's why I pass 'mainwin'  - reference to parent MainWindow. What do you mean by passing a type rather than a variable? How do you pass a type if you need to pass a reference to the parent window? If I pass anything else it complains that that reference doesn't exist in the current context.<br>
<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div class="plainMail">Yes. You didn't understand how signals and slots work. This explains it all: <br><a href="http://doc.trolltech.com/4.6/signalsandslots.html" target="_blank">http://doc.trolltech.com/4.6/signalsandslots.html</a> .<br><br>Short summery: This line<br>QObject.Connect(btnAbout, Qt.SIGNAL("clicked()"), mainwin, <br>Qt.SLOT("ShowAbout(mainwin, page)"));<br>connects to a method (slot) ShowAbout() which takes two arguments: one of type <br>mainwin, one of type page. There are two reasons why this won't work:<br><br>1. The signal doesn't provide any parameters, but the slot does. How is this <br>supposed to work?<br>2. You give a method signature to the SLOT method, i.e. mainwin and page are <br>expected to be types, not variables. But there is no type called 'mainwin' and <br>there is also no type called 'page'. Both are variables. But this
 is not how <br>signals and slots work. SIGNAL and SLOT expect _signatures_, not method call <br>expressions.<br><br>Furthermore, you can only define slots in QObject subclasses. Otherwise you <br>have to use delegate connections. (QObject.Connect(sender, SIGNAL(/*signal*/), <br>delegate { /* ... */ });)<br></div></blockquote></td></tr></table><br>