You could use the accessibleName
property. Set it for the widget you need, and then check it in your cycle with acessibleName()
function. It is an empty string by default, so it should be fairly easy to find your widget.
Another alternative is to disable all widgets, and then just enable the one you need directly:
for( QWidget * w : widgets )
{
w->setEnabled(false);
}
ui->myTable->setEnabled(true);
Or, finally, you can set the objectName
property with the setObjectName()
function, and use it as you do in your code.