# -*- coding: cp1250 -*-
import sys, os
path = os.path.dirname(sys.argv[0])
sys.path.append( os.path.join( path, "GUI" ))
from PyQt4 import QtGui, QtCore
from UstawieniaGui import Ui_Dialog as Ui_MainWindow
from Profile import Ui_Dialog as Ui_Profile
class Ustawienia(QtGui.QDialog):
def __init__(self, parent=None):
super(Ustawienia, self).__init__(parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.dialogs = list()
self.ui.OtworzProfilPB.clicked.connect(self.OtworzProfil)
def OtworzProfil(self):
self.dialog = OtworzProfil()
self.dialogs.append(self.dialog)
self.dialog.show()
class OtworzProfil(QtGui.QDialog):
def __init__(self, parent=None):
super(OtworzProfil, self).__init__(parent)
self.ui = Ui_Profile()
self.ui.setupUi(self)
self.ui.pushButton.clicked.connect(self.x)
def x(self):
app = Ustawienia()
app.ui.PlayerLE.setText('aaa')
self.close()
####################################
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
myapp = Ustawienia()
myapp.show()
sys.exit(app.exec_())
Nie mogę wypisać tekstu 'aaa' w lineEdit PlayerLE w okie Ustawienia.. Jakaś rada?