How to get the child widgets from a Widget?
Qt version: 4.4.3:
Consider the code:
Code:
// ...
// Used for the naming of the checkboxes
unsigned count= 1;
// Adds the checkboxes empty
for(unsigned j= 1; j<= 8; ++j)
{
++count;
checkBox
->setObjectName
(QString("checkBox_%1").
arg(QString::number(count
)));
checkBox
->setGeometry
(QRect(50* (j
+ 1)+ 37,
20* i,
83,
20));
}
// ...
switch(runLevelsInfostring[0])
{
case '0':
scrollAreaWidgetContents.nextInFocusChain()->setCheckState(Qt::Checked);
}
I want to make the checkbox named "checkBox_1", to become << checkBox_1->setCheckState(Qt::Checked); >> How can I do that?
Thanks.
Re: How to get the child widgets from a Widget?
Re: How to get the child widgets from a Widget?