class AboutWidget(QWidget): def __init__(self, parent=None): QWidget.__init__(self, parent) self.ui = About_Form() self.ui.setupUi(self) l = QLabel(self.ui.widget) print(self.ui.widget.width) pixmap = QPixmap(Config.data['GNU_PNG']) pixmap = pixmap.scaled(QSize(self.ui.widget.width(),self.ui.widget.height())) l.setPixmap(pixmap) self.initSignals() self.show() self.setWindowTitle('About') def close(self): self.hide() self.setParent(None) def initSignals(self): QObject.connect(self.ui.pushButton, SIGNAL('clicked()'), self.close)
def __init__(self, parent=None): QWidget.__init__(self, parent) self.ui = About_Form() self.ui.setupUi(self) l = QLabel(self.ui.widget) print(self.ui.widget.width) pixmap = QPixmap(Config.data['GNU_PNG']) pixmap = pixmap.scaled(QSize(self.ui.widget.width(),self.ui.widget.height())) l.setPixmap(pixmap) self.initSignals() self.show() self.setWindowTitle('About')