Ask Your Question
3

What is the process for eliminating the additional border in QTabBar?

asked 2021-11-03 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-02-16 03:00:00 +0000

huitzilopochtli gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-11-03 11:00:00 +0000

Seen: 15 times

Last updated: Feb 16 '23