if "ui" refers to a QDesigner form you cannot access elements by name directly.
After you call "setupUi()" the form elements become children of the QWidget you passed to setupUi.
In this case you could use QObject::findChild method to find child by name.
Bookmarks