[PyQt] Make a exec_() in a Dialog
rudsonalves at yahoo.com.br
rudsonalves at yahoo.com.br
Sat Nov 15 19:45:42 GMT 2008
Hi David,
I need insert operations, as get file parts from internet, in main loop
of the QDialog.
I try to use the QTimer.singleShot to start the wget_file, but it freeze
all dialog buttons (as Cancel Button) until the wget_file routine return.
know who I can make it?
> On Sat Nov 15 17:24:08 GMT 2008, rudsonalves wrote:
>
>
>> I am implementing a dialogue to download programs in an application. I
>> need to start the dialog to download a file, only after the call of
>> .exec_().
>>
>> I try implement a .exec_() method, but it no open dialog window. See code:
>>
>
> [...]
>
>
>> def exec_(self):
>> print 'Go, go, go ...'
>> self.show()
>> if self.urlLabel.text() != '':
>> print 'Start...'
>> self.wget_file() # Download routine
>> else:
>> QMessageBox.Warning(self, 'Invalid url')
>> QDialog.accept(self)
>>
>
> Normally, you only need to call the exec_() method, but if you want to
> reimplement it to add extra features, you should call the base class's
> implementation instead of calling its show() method:
>
> def exec_(self):
> print 'Go, go, go ...'
> QDialog.exec_(self)
> # ...
>
> David
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/
More information about the PyQt
mailing list