I've quickly created this for you, hope it helps a bit.<div><br></div><div>Note: it's not working 100%, since the main event loop isn't terminated after the dialog is closed.</div><div><br><br><div class="gmail_quote">
On Mon, Aug 8, 2011 at 16:58, Baz Walter <span dir="ltr"><<a href="mailto:bazwal@ftml.net">bazwal@ftml.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 08/08/11 14:58, Eric Frederich wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm just a little confused on what connections to make.<br>
I'm sure I could get something working but I'd be going about it the wrong way.<br>
<br>
Forget my original post.<br>
<br>
This is what I want.<br>
I want a login dialog with username, password and group.<br>
I want that dialog to stay up until the login is successful or user hits cancel.<br>
I have a QThread subclass for logging in.<br>
It emits either "success" or "fail", and with fail it provides some<br>
text feedback.<br>
When the login thread starts a progress bar should start animating.<br>
<br>
This is where I am completely lost as far as connections go.<br>
The QDialogButtonBox has accepted, rejected.<br>
The QDialog has accepted, rejected.<br>
My login thread has success, and fail.<br>
There are clicked() signals as well.<br>
<br>
Its not complicated, but I'm new to Qt and PyQt.<br>
I think I need someone to spell it out for me.<br>
</blockquote>
<br></div>
okay. in designer, open up View -> Signal/Slot Editor, remove the buttonBox.accepted() connection, and then re-compile.<br>
<br>
next, in your LoginDialog class, rename your accept method to, say, handleAccepted, and connect it to the accepted() signal of the buttonBox:<br>
<br>
self.buttonBox.accepted.<u></u>connect(self.handleAccepted)<br>
<br>
finally, in handleAccepted, replace the thread connection with:<br>
<br>
self.lt.finished.connect(self.<u></u>accept)<br>
<br>
(obviously, i haven't tested this at all, but hopefully it will give you the general idea).<div><div></div><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.<u></u>com/mailman/listinfo/pyqt</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Nick Gaens<br>
</div>