Python and Qt (PyQt) - method call before resizing

I have a question. My program has an application class. It inherits from QtGui.QMainWindow. In ini, I call my own method that works with graphics. And it must be called before resizing. How can i do this? Thanks.

EDIT: you can here resize event is equal to 14, and show event equals 17. So I have to find an event with less than 14 values.

I found my problem. In the constructor, before creating the image descriptor, I move the window to some position ... So during this action, resizeEvent is called. Sorry for this question.

+1


a source to share


1 answer


You can override in your class a method resizeEvent

(which QMainWindows

inherits from QWidget

), see http://doc.trolltech.com/4.4/qwidget.html#resizeEvent - in your override, call other code and then pass the rest of the work to the parent version of the method.



+1


a source







All Articles