int aId = 0;
foreach(QString aBtnTxt, aList) {
QToolButton* aBtn = new QToolButton(aGroupBox);
+ aBtn->setFocusPolicy(Qt::StrongFocus);
aBtn->setCheckable(true);
aBtn->setToolTip(aBtnTxt);
}
myButtons->button(0)->setChecked(true);
connect(myButtons, SIGNAL(buttonClicked(int)), this, SLOT(onCurrentIndexChanged(int)));
+ connect(myButtons, SIGNAL(buttonClicked(int)), this, SIGNAL(itemSelected(int)));
} else {
myLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
myCombo->addItems(aList);
connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
+ connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(itemSelected(int)));
}
}
bool isBlocked = myButtons->blockSignals(true);
myButtons->button(aIntAttr->value())->setChecked(true);
myButtons->blockSignals(isBlocked);
+ emit itemSelected(aIntAttr->value());
}
}
return true;
bool ModuleBase_WidgetChoice::focusTo()
{
if (myCombo)
- myCombo->setFocus();
+ ModuleBase_Tools::setFocus(myCombo, "ModuleBase_WidgetChoice::focusTo()");
else
return false;
return true;