void OTS_MainWindow::AddTabForQuestion(QTabWidget *TabWidget){ MainTabWidget =new QWidget; MainTabVBoxLayout =new QVBoxLayout; GlobalVaribles::NumberOfTab++; GlobalVaribles::SummOfTabAndTypeOfQuestionForCurrentTab.resize(GlobalVaribles::NumberOfTab); GlobalVaribles::NumberOfQuestionsCurrentTab.resize(GlobalVaribles::NumberOfTab); QString NumberOfTabForTabWidget=QString::number(GlobalVaribles::NumberOfTab); TabWidget->addTab(MainTabWidget,NumberOfTabForTabWidget); TabWidget->setCurrentWidget(MainTabWidget); TabWidget->currentWidget()->setLayout(MainTabVBoxLayout);}
void OTS_MainWindow::AddVariantForSingleAnsverQuestion(QTabWidget *TabWidget){ AnsverRadioButton= new QRadioButton; TextForAnsverContainer= new QTextEdit; RadioOrCheckButtonAndAnsverHBoxLayout=new QHBoxLayout; QVBoxLayout *Layout=static_cast<QVBoxLayout*>(TabWidget->currentWidget()->layout()->layout()->itemAt(1)); GlobalVaribles::NumberOfQuestionsCurrentTab[TabWidget->currentIndex()]++; Layout->addLayout(RadioOrCheckButtonAndAnsverHBoxLayout); RadioOrCheckButtonAndAnsverHBoxLayout->addWidget(AnsverRadioButton,1); RadioOrCheckButtonAndAnsverHBoxLayout ->addWidget(TextForAnsverContainer,5);}