class HelpWidget(PAbstractBox): def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_Help() self.ui.setupUi(self) self._animation = 2 self._duration = 500 self.hide() def showHelp(self): QTimer.singleShot( 1, lambda: self.animate(start=TOPCENTER, stop=TOPCENTER)) def hideHelp(self): self.animate(start=CURRENT, stop=TOPCENTER, direction=OUT) def toggleHelp(self): if self.isVisible(): self.hideHelp() else: self.showHelp() def setHelp(self, help): QTimer.singleShot(1, self.adjustSize)
class HelpWidget(PAbstractBox): def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_Help() self.ui.setupUi(self) self._animation = 2 self._duration = 500 self.hide() def showHelp(self): QTimer.singleShot(1, lambda: self.animate(start=TOPCENTER, stop=TOPCENTER)) def hideHelp(self): self.animate(start=CURRENT, stop=TOPCENTER, direction=OUT) def toggleHelp(self): if self.isVisible(): self.hideHelp() else: self.showHelp() def setHelp(self, help): QTimer.singleShot(1, self.adjustSize)
def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_Help() self.ui.setupUi(self) self._animation = 2 self._duration = 500 self.hide()