Question

i have a question. There is application class in my program. It is inherited from QtGui.QMainWindow. In ini I call my own method which works with graphic. And it should be called before resize event. How can i do that? Thanks.

EDIT: As you can se here the value of resize event is 14, and show event is 17. So i should find event with less than 14 value.

I found my problem. In constructor before creating handle of image i'm moving window to some position... So during that action resizeEvent calls. Sorry for this question.

Was it helpful?

Solution

You could override in your class the resizeEvent method (which QMainWindows inherits from QWidget), see http://doc.trolltech.com/4.4/qwidget.html#resizeEvent -- in your override, call your other code, then delegate the rest of the work to the parent's version of the method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top