def event(self, event): if event.type() == QEvent.PolishRequest: if self.testPaintAttribute(self.Opaque): self.setAttribute(Qt.WA_OpaquePaintEvent, True) if event.type() in (QEvent.PolishRequest, QEvent.StyleChange): self.updateStyleSheetInfo() return QFrame.event(self, event)
def event(self, event): ok = QFrame.event(self, event) if event.type() == QEvent.LayoutRequest: self.updateLayout() elif event.type() == QEvent.PolishRequest: self.replot() return ok