for (int i =0; i<8;i++) { QTableWidget *tableWidget[i] = new QTableWidget(this); tabWidget->addTab(tableWidget[i],"test"); }
C++ (Qt)...private: enum {SIZE = 8}; QTableWidget **tableWidget;...
C++ (Qt)... tableWidget = new QTableWidget*[SIZE]; for (int i = 0; i < SIZE; ++i) { tableWidget[i] = new QTableWidget(this); tabWidget->addTab(tableWidget[i], "test"); }...
QGridLayout **Layout; Layout = new QGridLayout*[SIZE]; Layout[i] = new QGridLayout(this); //Layout[i]->addWidget(cksone[i],0,0,8,0); Layout[i]->addWidget(labcksBase[i],2,1); //Layout[i]->addWidget(checkbox[i],2,2); Layout[i]->addWidget(cksBase[i],3,1); Layout[i]->addWidget(labcksLogin[i],4,1); Layout[i]->addWidget(cksLogin[i],5,1); Layout[i]->addWidget(labcksPass[i],6,1); Layout[i]->addWidget(cksPass[i],7,1); QWidget **wgt; wgt = new QWidget*[SIZE]; wgt[i]= new QWidget(this); wgt[i]->setDisabled(true); wgt[i]->setLayout(Layout[i]); toolBox->addItem(wgt[i],str); vbox->addWidget(toolBox); } vbox->addStretch(2); vbox->addWidget(new QLabel(tr("Директория выгрузки:"),this)); vbox->addWidget(DIR); vbox->addWidget(button); vbox->addWidget(buttonsave); //vbox->addStretch(2); hbox->addLayout(vbox); mainWidget->setLayout(hbox);
C++ (Qt)private: enum {SIZE = 8}; QTableWidget *tableWidget[SIZE];
C++ (Qt)for (int i = 0; i < SIZE; ++i) { tableWidget[i] = new QTableWidget(this); tabWidget->addTab(tableWidget[i], "test"); }