What signal can be connected to an initial dialog display in pyqt4 (qt)
I have an application in which I would like to connect whatever signal is emitted when a pyqt4 dialog is displayed in order to do execute an initial method. I don't want the method to be called in the __init__
method for a number of reasons. I've spent quite some time searching but I have yet to find an answer. I'm sure there is a simple solution tha开发者_C百科t because of my inexperience I am overlooking as I can do this in wxPython. Suggestions?
There is no signal emitted on first display, instead, you will have to intercept the first resizeEvent
or paintEvent
by overloading these methods (as you don't want to initialize from the __init__
method).
Another option would be to add your own showAndInit
method, that initializes and then calls show
.
精彩评论