[PyQt] acces to object in different class
lucaberto at libero.it
lucaberto at libero.it
Thu Nov 17 16:58:25 GMT 2016
Hello i'm using eric as ide and i have two classclass Form(QWidget, Ui_Form): """ Class documentation goes here. """ def __init__(self, parent=None): """ Constructor @param parent reference to the parent widget @type QWidget """ super(Form, self).__init__(parent) self.setupUi(self) self.tabWidget.setCurrentIndex(0) combo = QComboBox() self.disegno = Cornice(Form)
def on_pushButton_7_clicked(self): """ Slot documentation goes here. """ # TODO: not implemented yet #raise NotImplementedError self.lista_dati_prova = [........] lista_dati = self.dati_prova self.lineEdit.setText('test') self.disegno.cornice(lista_dati)
class Cornice(): def __init__(self, parent=None): """ Constructor @param parent reference to the parent widget @type QWidget """ lista_dati = []
def cornice(self, lista_dati): import math freqfinale = lista_dati[0] spostamento = lista_dati[2] nome_cal = self.lineEdit.text()
How i can access to self.lineEdit without passing parameter from the class Form and without using signal, but asking directly from Cornice class?
Thanks
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161117/7f2c4b62/attachment.html>
More information about the PyQt
mailing list