ich habe im Hauptprogramm einen Ordner erstellt:
Code: Alles auswählen
class ParentApp(QMainWindow):
def __init__(self, parent=None):
QMainWindow.__init__(self, parent)
loadUi(os.path.join(SCRIPT_DIRECTORY, 'ParentApp.ui'), self)
self.tempdir=mkdtemp(suffix='TemppP')
unter wxPython ging das mit:
Code: Alles auswählen
self.tempdir=parent.tempdir
Code: Alles auswählen
class childPage(QMainWindow):
def __init__(self, parent=None):
QMainWindow.__init__(self, parent)
self.parent=parent
loadUi(os.path.join(SCRIPT_DIRECTORY, 'childPage.ui'), self)
self.tempdir=parent.tempdir
zumindest erhalte ich die Fehlermeldung
Code: Alles auswählen
self.tempdir=parent.tempdir
AttributeError: 'NoneType' object has no attribute 'tempdir'
Daher bitte ich Hilfe.
Gruß Mathi