I have a Qt progam that I've made using Qt Creator. I made a .ui dialog (mainwindow.ui), and in the ui editor add the controls and slots. These end up creating methods in mainwindow.cpp eg.
void MainWindow::on_btnRunJohn_clicked()
In these methods, I'm accessing the controls directly to update them eg.
ui->txtConfigFileName->setText("Some text to put in the text box");
I know there are numerous ways to manage window dialogs in Qt (eg. QML, subclassing), but am wondering whether this approach is suboptimal, or limits things in some way. Is this a reasonable way to code in Qt, or is there a better approach to managing dialogs? I'm happy defining the controls up front ie. I don't need to add/delete controls at runtime.