How to access Qt components loaded from file?
Juan Christian
juan0christian at gmail.com
Tue Nov 18 08:08:43 EST 2014
More information about the Python-list mailing list
Tue Nov 18 08:08:43 EST 2014
- Previous message (by thread): How to access Qt components loaded from file?
- Next message (by thread): How to access Qt components loaded from file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. ^^ On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre < vincent.vande.vyvre at telenet.be> wrote: > Le 18/11/2014 13:18, Juan Christian a écrit : > > I have this simple code that load any Qt Designer .UI file: > > > > from PySide.QtCore import QFile > > from PySide.QtGui import QApplication > > from PySide.QtUiTools import QUiLoader > > > > > > def loadui(file_name): > > loader = QUiLoader() > > uifile = QFile(file_name) > > uifile.open(QFile.ReadOnly) > > ui = loader.load(uifile) > > uifile.close() > > return ui > > > > > > if __name__ == "__main__": > > import sys > > > > app = QApplication(sys.argv) > > MainWindow = loadui("main.ui") > > MainWindow.show() > > app.exec_() > > > > Let's say I have a QTextEdit called txtbox. How can I access this > > txtbox inside my Python code? > > > > > How about MainWindow.txtbox ? > -- > https://mail.python.org/mailman/listinfo/python-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20141118/158bab2b/attachment.html>
- Previous message (by thread): How to access Qt components loaded from file?
- Next message (by thread): How to access Qt components loaded from file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list