在Tab的右上角添加控件
QPushButton *add = new QPushButton;
add->setText("+");
add->resize(30,30);
ui->tabWidget->setCornerWidget(add,Qt::TopRightCorner);
结果:
Tab添加子页
QWidget*newp =new QWidget;
ui->tabWidget->addTab(newp,"new Camera");
Tab子页显示删除符号
找到这个属性打勾
Tab删除子页
ui->tabWidget->removeTab(i);