18 arr[0]->setToolTip(
"Crate 0, Board 0, Index 0");
20 for (
int i=1;
i<40;
i++)
22 QPushButton *b =
new QPushButton(static_cast<QWidget*>(arr[0]->parent()));
24 b->setEnabled(arr[0]->isEnabled());
25 b->setSizePolicy(arr[0]->sizePolicy());
26 b->setMaximumSize(arr[0]->maximumSize());
27 b->setIcon(arr[0]->icon());
28 b->setIconSize(arr[0]->iconSize());
29 b->setCheckable(arr[0]->isCheckable());
30 b->setFlat(arr[0]->isFlat());
33 str <<
"Crate " <<
i/10 <<
", Board " <<
i%10 <<
", Index " <<
i;
34 b->setToolTip(str.str().c_str());
36 lay->addWidget(b,
i/10+1,
i%10+1, 1, 1);
41 const QString name = arr[0]->objectName();
43 for (
int i=0;
i<40;
i++)
45 arr[
i]->setObjectName(name+QString::number(
i));
46 QObject::connect(arr[
i], SIGNAL(clicked()),
this, slot);