[Interest] [interest] UITools - how to modify the GUI?
Tamás Nagy
tamas.nagy.001 at gmail.com
Fri Apr 10 16:02:22 CEST 2015
Hi,
I loaded the UI with UITools.
I read the new texts of buttons from an XML file.
I would like to change the button names.
I would like to print error messages into the textEdit.
I cannot access the textEdit:
#include <QtUiTools/QUiLoader>
QUiLoader uiLoader;
QFile file("mainwindow.ui");
ui = uiLoader.load(&file);
// it always returns 0, no idea why. I have a textEdit with this name: textEdit.
QTextEdit * textedit2 = ui->findChild<QTextEdit*>("textEdit",
Qt::FindChildrenRecursively);
if(textedit2) {
textedit2->setText("TEST writing...\n");
textedit2->update();
ui->update();
}
I can access elements, but I cannot change them. What is wrong?
Tamas
More information about the Interest
mailing list