我想消除 QTabWidget 的边框,如图所示。选项卡标签的下半部分应遮挡它们相交的小部件。这可能吗?代码如下:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QGraphicsScene"
#include "QTableWidget"
#include "QGraphicsView"
#include "QTextEdit"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QGraphicsView* left = new QGraphicsView(new QGraphicsScene);
QTextEdit* right = new QTextEdit;
QTabWidget* tab = new QTabWidget(this);
tab->insertTab(0, left, "Left");
tab->insertTab(1, right, "Right");
setCentralWidget(tab);
}
MainWindow::~MainWindow()
{
delete ui;
}