Many thanks, worked. The only problem now is that I don't have auto-complete for anything, because of this approach... I'll have to check the doc more regularly. ^^<br><br><div class="gmail_quote">On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre <<a href="mailto:vincent.vande.vyvre@telenet.be">vincent.vande.vyvre@telenet.be</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 18/11/2014 13:18, Juan Christian a écrit :<br>
> I have this simple code that load any Qt Designer .UI file:<br>
><br>
> from PySide.QtCore import QFile<br>
> from PySide.QtGui import QApplication<br>
> from PySide.QtUiTools import QUiLoader<br>
><br>
><br>
> def loadui(file_name):<br>
> loader = QUiLoader()<br>
> uifile = QFile(file_name)<br>
> uifile.open(QFile.ReadOnly)<br>
> ui = loader.load(uifile)<br>
> uifile.close()<br>
> return ui<br>
><br>
><br>
> if __name__ == "__main__":<br>
> import sys<br>
><br>
> app = QApplication(sys.argv)<br>
> MainWindow = loadui("main.ui")<br>
> MainWindow.show()<br>
> app.exec_()<br>
><br>
> Let's say I have a QTextEdit called txtbox. How can I access this<br>
> txtbox inside my Python code?<br>
><br>
><br>
How about MainWindow.txtbox  ?<br>
--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</blockquote></div>