Dynamic dialogs are dialogs that are created from Qt Designer .ui files at run-time. Instead of convertingthe .ui file to C++ code using uic, we can load the file at run-time using the QUiLoader class:
QUiLoader uiLoader;QFile file("sortdialog.ui");QWidget *sortDialog = uiLoader.load(&file);if (sortDialog) {...}
We can access the form's child widgets using QObject::findChild<T>():QComboBox *primaryColumnCombo =sortDialog->findChild<QComboBox *>("primaryColumnCombo");if (primaryColumnCombo) {...}