class About(QDialog): """ This screen shows the resume of the project """ def __init__(self, parent=None): super(About, self).__init__(parent) self.setupUi() self.connectActions() self.parent = parent #=================================================================================================================== def setupUi(self): self.ui = Ui_aboutscreen() self.ui.setupUi(self) icon_path = os.path.join(os.path.dirname(__file__), "../images/tool-animator.png") self.ui.lblimageicon.setPixmap(QPixmap(icon_path)) self.ui.lblimageicon.setMaximumSize(QSize(220, 340)) self.ui.lblimageicon.setScaledContents(True) project_name = ("<b>{} - {}</b>".format(app_name, app_version)) self.ui.lblprojectname.setText(project_name) version_program = ("<b>Python {} - Qt {} - PyQt {}</b>".format(platform.python_version(), QT_VERSION_STR, PYQT_VERSION_STR)) self.ui.lblversionplateform.setText(version_program) #=================================================================================================================== def connectActions(self): """ Connect actions to the ui file """ self.ui.btncredits.clicked.connect(self.runCredits) #=================================================================================================================== def runCredits(self): """ Run the Credits Dialog """ self.windo = Credits() self.windo.exec_()
def setupUi(self): self.ui = Ui_aboutscreen() self.ui.setupUi(self) icon_path = os.path.join(os.path.dirname(__file__), "../images/tool-animator.png") self.ui.lblimageicon.setPixmap(QPixmap(icon_path)) self.ui.lblimageicon.setMaximumSize(QSize(220, 340)) self.ui.lblimageicon.setScaledContents(True) project_name = ("<b>{} - {}</b>".format(app_name, app_version)) self.ui.lblprojectname.setText(project_name) version_program = ("<b>Python {} - Qt {} - PyQt {}</b>".format(platform.python_version(), QT_VERSION_STR, PYQT_VERSION_STR)) self.ui.lblversionplateform.setText(version_program)