def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_InfoWidget() self.ui.setupUi(self) self.ui.hideButton = QtGui.QPushButton(self.ui.webView) self._animation = 2 self._duration = 500 self.enableOverlay() self.hide()
class UserStudyItemInfo(PAbstractBox): def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_InfoWidget() self.ui.setupUi(self) self.ui.hideButton = QtGui.QPushButton(self.ui.webView) self._animation = 2 self._duration = 500 self.enableOverlay() self.hide() def resizeEvent(self, event): PAbstractBox.resizeEvent(self, event) print event.size().width() self.ui.hideButton.move(event.size().width() - self.ui.hideButton.width(), 0)
class UserStudyItemInfo(PAbstractBox): def __init__(self, parent): PAbstractBox.__init__(self, parent) self.ui = Ui_InfoWidget() self.ui.setupUi(self) self.ui.hideButton = QtGui.QPushButton(self.ui.webView) self._animation = 2 self._duration = 500 self.enableOverlay() self.hide() def resizeEvent(self, event): PAbstractBox.resizeEvent(self, event) print event.size().width() self.ui.hideButton.move( event.size().width() - self.ui.hideButton.width(), 0)