I am trying to get a list of widgets from .ui files. So here is some code:
QUiLoader loader;
QFile file(fname);
file.open(QFile::ReadOnly);
QWidget *myWidget = loader.load(&file, this);
file.close();
QStringList avlb_wd = loader.availableWidgets();
QMessageBox msg;
foreach (const QString &str, avlb_wd)
{
msg.setText(str);
msg.exec();
}
But, as I see it, the available widgets () gives me all the widgets, not the ones in the .ui file. How can i achieve this? Thanks, go ahead.
source
share