def resize ( self , width , height ) : self . _buffer = QtGui . QImage ( width , height , QtGui . QImage . Format_RGB32 ) QtGui . QWidget . resize ( self , width , height )
python fix the size of qwidget
def resize(self, width, height):
        """
        @summary: override resize function
        @param width: {int} width of widget
        @param height: {int} height of widget
        """
        self._buffer = QtGui.QImage(width, height, QtGui.QImage.Format_RGB32)
        QtGui.QWidget.resize(self, width, height)