The reason that your code is not working is that you need the pointers to the objects in the form. Try something like this (in C++ -don't know Python):
QList<QLineEdit *>lineEditNames = findChildren<QLineEdit *>();
foreach
(QLineEdit *lineEditPtr, lineEditNames
) hash[lineEditPtr->objectName()]=lineEditPtr;
hash.value(txtBox1)->setText(value); // put this in the loop where you read from your xml file
QHash<QString, QLineEdit *> hash;
QList<QLineEdit *>lineEditNames = findChildren<QLineEdit *>();
foreach(QLineEdit *lineEditPtr, lineEditNames)
hash[lineEditPtr->objectName()]=lineEditPtr;
hash.value(txtBox1)->setText(value); // put this in the loop where you read from your xml file
To copy to clipboard, switch view to plain text mode
QMap can also be used, but the docs say that QHash performs faster lookups.
Note: you will need to remove the "ui." from your object names.
HTH
Bookmarks