def event(self, event): if event.type() == QEvent.LayoutRequest: self.__fixMinimumWidth() return QDockWidget.event(self, event)