Ask Your Question

Revision history [back]

The process for eliminating the additional border in QTabBar involves setting the tab border to zero using style sheets. Here are the steps:

  1. Create a qss file or add a style sheet to the QMainWindow.
  2. In the style sheet, apply the following code to the QTabWidget and QTabBar:

    QTabWidget::pane {border: 0;}

    QTabBar::tab { border-style: none; padding: 6px; }

  3. Save the style sheet and apply it to the QTabWidget using the setStyleSheet() function.

This will remove the additional border around the QTabBar and make it consistent with the main window.