MainWindow
::MainWindow(QWidget *parent
){
tabWidget->setContentsMargins(0,0,0,0);
tabWidget
->addTab
(new QWidget(),
"test1");
tabWidget
->addTab
(new QWidget(),
"test2");
tabWidget->widget(0)->setContentsMargins(0,0,0,0);
tabWidget->widget(1)->setContentsMargins(0,0,0,0);
setCentralWidget(tabWidget);
tabWidget2->setContentsMargins(0,0,0,0);
tabWidget2
->addTab
(new QWidget(),
"test1");
tabWidget2
->addTab
(new QWidget(),
"test2");
tabWidget2->widget(0)->setContentsMargins(0,0,0,0);
tabWidget2->widget(1)->setContentsMargins(0,0,0,0);
layout->setContentsMargins(0,0,0,0);
layout->addWidget(tabWidget2);
tabWidget->widget(0)->setLayout(layout);
}
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
QTabWidget *tabWidget = new QTabWidget(this);
tabWidget->setContentsMargins(0,0,0,0);
tabWidget->addTab(new QWidget(), "test1");
tabWidget->addTab(new QWidget(), "test2");
tabWidget->widget(0)->setContentsMargins(0,0,0,0);
tabWidget->widget(1)->setContentsMargins(0,0,0,0);
setCentralWidget(tabWidget);
QTabWidget *tabWidget2 = new QTabWidget(this);
tabWidget2->setContentsMargins(0,0,0,0);
tabWidget2->addTab(new QWidget(), "test1");
tabWidget2->addTab(new QWidget(), "test2");
tabWidget2->widget(0)->setContentsMargins(0,0,0,0);
tabWidget2->widget(1)->setContentsMargins(0,0,0,0);
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0,0,0,0);
layout->addWidget(tabWidget2);
tabWidget->widget(0)->setLayout(layout);
}
To copy to clipboard, switch view to plain text mode
Bookmarks