class AboutDialog(QDialog): #Class constructor def __init__(self,photoArray=None): QDialog.__init__(self) #Inherit from base UI class self.ui=Ui_frmAbout() #Call the initialize component method self.ui.setupUi(self) #Resources have been embedded #self.initDialog() self.ui.buttonBox.clicked.connect(self.close) def initDialog(self): #Fetch references logoPixMap=QPixmap(":/plugins/stdm/images/un_habitat.jpg") self.ui.lblLogo.setPixmap(logoPixMap) dirP = os.path.dirname(__file__) normPath=str(dirP) + '\stdm\summary.txt' #absPath=os.path.join(str(dir),'\stdm\summary.txt') aboutStream=open(os.path.normpath(normPath)) about=aboutStream.read() #self.ui.lblAbout.setText(about)
def __init__(self, photoArray=None): QDialog.__init__(self) #Inherit from base UI class self.ui = Ui_frmAbout() #Call the initialize component method self.ui.setupUi(self) #Resources have been embedded #self.initDialog() self.ui.buttonBox.clicked.connect(self.close)
def __init__(self,photoArray=None): QDialog.__init__(self) #Inherit from base UI class self.ui=Ui_frmAbout() #Call the initialize component method self.ui.setupUi(self) #Resources have been embedded #self.initDialog() self.ui.buttonBox.clicked.connect(self.close)
class AboutDialog(QDialog): #Class constructor def __init__(self, photoArray=None): QDialog.__init__(self) #Inherit from base UI class self.ui = Ui_frmAbout() #Call the initialize component method self.ui.setupUi(self) #Resources have been embedded #self.initDialog() self.ui.buttonBox.clicked.connect(self.close) def initDialog(self): #Fetch references logoPixMap = QPixmap(":/plugins/stdm/images/un_habitat.jpg") self.ui.lblLogo.setPixmap(logoPixMap) dirP = os.path.dirname(__file__) normPath = unicode(dirP) + '\stdm\summary.txt' #absPath=os.path.join(str(dir),'\stdm\summary.txt') aboutStream = open(os.path.normpath(normPath)) about = aboutStream.read()