uMain::uMain(QWidget *pwgt) : QWidget(pwgt){ ............ QScrollArea *sArea = new QScrollArea(pwgt); QVBoxLayout *pvbxLayout1 = new QVBoxLayout(sArea); qsrand(QTime(0,0,0).msecsTo(QTime::currentTime())); for (int i=0; i<psbThread->value(); i++) { QSpinBox *psbArea = new QSpinBox(pwgt); psbArea->setObjectName("TimeStartThread_"+QString::number(i+1)); QLabel *plblPeriod = new QLabel(QTextCodec::codecForName("Windows-1251")->toUnicode("Периодичность запуска потока ")+QString::number(i+1)); QLineEdit *pleArea = new QLineEdit; pleArea->setObjectName("LineEditThread_"+QString::number(i+1)); QLabel *plblArea = new QLabel(QTextCodec::codecForName("Windows-1251")->toUnicode("Сообщение для потока ")+QString::number(i+1)); plblArea->setBuddy(pleArea); QComboBox *pcbPriority = new QComboBox; pcbPriority->setObjectName("Priority_"+QString::number(i+1)); pcbPriority->addItems(QStringList() << "Info" << "Warning" << "Critical"); pcbPriority->setCurrentIndex(qrand()%3); QLabel *plblPriority = new QLabel(QTextCodec::codecForName("Windows-1251")->toUnicode("Приоритет для потока ")+QString::number(i+1)); plblPriority->setBuddy(pcbPriority); QHBoxLayout *phbxLayout5 = new QHBoxLayout; phbxLayout5->addWidget(plblPeriod); phbxLayout5->addWidget(psbArea); phbxLayout5->addWidget(plblArea); phbxLayout5->addWidget(pleArea); phbxLayout5->addWidget(plblPriority); phbxLayout5->addWidget(pcbPriority); phbxLayout5->addStretch(1); pvbxLayout1->addLayout(phbxLayout5); } QWidget *pwgtBox = new QFrame(this); pwgtBox->setLayout(pvbxLayout1); sArea->setWidget(pwgtBox); QVBoxLayout *pvbxLayout = new QVBoxLayout(); pvbxLayout->addLayout(phbxLayout1); pvbxLayout->addLayout(phbxLayout2); pvbxLayout->addLayout(phbxLayout3); pvbxLayout->addLayout(phbxLayout4); pvbxLayout->addWidget(sArea); setLayout(pvbxLayout);}