hello I am marco and I am new in the forum
I just started with QT but I'm a autodidact programmer c ++ for a long time
I wanted to create a tab with a distinctive form and each time you create a new tab window I have always the same layout and my basic forms
Immagine.jpg
void MainWindow::on_tabWidget_currentChanged(int index)
{
qDebug() << n_tab;
if (index == n_tab){
ui->tabWidget->setTabText(n_tab, "QString::number(n_tab)");
// ===============================================
// copi form from tab 1 end paste on new tabWidget
// ===============================================
ui->tabWidget->addTab(tabWidget,"+");
n_tab ++;
}
}
void MainWindow::on_tabWidget_currentChanged(int index)
{
qDebug() << n_tab;
if (index == n_tab){
ui->tabWidget->setTabText(n_tab, "QString::number(n_tab)");
QWidget *tabWidget;
tabWidget = new QWidget;
// ===============================================
// copi form from tab 1 end paste on new tabWidget
// ===============================================
ui->tabWidget->addTab(tabWidget,"+");
n_tab ++;
}
}
To copy to clipboard, switch view to plain text mode
in this case if we press the "+" tab add a new tab
I would like already I said the nuvo widget is equal to the first
Thank you in advance
Bookmarks