QTabBar is a class from the Qt Toolkit which provides a tab bar, e.g. for use in tabbed dialogs.
Questions tagged [qtabbar]
95 questions
25
votes
2 answers
Qt Increase QTabWidget's QTabBar size
I need to make the tabs that I have oriented at the bottom of my QTabWidget larger. We'll be using a touch-screen, so the default sizes are a little too small.
I see no easy way to do this (currently seeing no good way to even do it at all. The only…

San Jacinto
- 8,774
- 5
- 43
- 58
19
votes
1 answer
QTabBar vs QTabWidget
I am using QTabWidget in my project. Is there any good reason I should use QTabBar and not QTabWidget?
What advantages I have if I use QTabWidget?

RLT
- 4,219
- 4
- 37
- 91
14
votes
4 answers
How do I disable one tab in a QTabWidget?
I have a QTabWidget called tabWidget. It has three tabs: "Basic", "Advanced", and "Current Structure". The tabs are displayed in the widget in that order.
I want to disable the "Advanced" tab whenever the Boolean result is false. I thought it…

Joey Kleingers
- 297
- 1
- 4
- 13
10
votes
1 answer
QToolButton not visible in windows
I have derived the class of QTabBar to implement "+" (new tab button) button using QToolButton (similar to google chrome). However, it is working in my Linux machine but doesn't work in my windows machine. By not working I mean QToolButton is not…

abhiarora
- 9,743
- 5
- 32
- 57
10
votes
2 answers
How to insert a space between two tabs in a QTabWidget?
I'd like to insert a space to separate the second tab from the third. Is this possible? I've tried some stylesheets but as this widget is kind of new to me I've had no success so far.

SamuelNLP
- 4,038
- 9
- 59
- 102
10
votes
5 answers
Tab close button position
I want to style my tabs in my Qt app as follows:
I used following style sheet:
QTabBar{background-color: #fff; border-top: 0px;}
QTabBar::tab {
border-image: url(:/New_UI/tab_inactive.png) 7 17 7 2;
margin-left: 2px;
border-right:…

warunanc
- 2,221
- 1
- 23
- 40
8
votes
3 answers
pyqt5 tabwidget vertical tab horizontal text alignment left
Since pyqt doesn't have horizontal text in vertical tab option, I followed this link to make it happen.
I wanted to have icons on the left and then text after icon and different color for selected tab text, inactive tabs text. Below code gets it…

Deadlyxda
- 115
- 1
- 7
7
votes
1 answer
Qt: hiding border for selected tab in QTabBar
QTabBar has a 1px border that separates tabs from their content.
QTabWidget::pane { border:1px solid #C4C4C3; }
I want the border to disappear under selected tab, like it's done in all browsers and most of applications using tabs.
However, setting…

Alex
- 34,581
- 26
- 91
- 135
6
votes
3 answers
Qt4 expanding tabs in QTabBar
I am subclassing QTabWidget to add a QTabBar, who's tabs stretch over the whole width of the tabBar. Therefore I am setting the expanding property to true. This doesn't seem to change anything about the behavior of the tabs.
Did anyone encounter the…

user636530
- 63
- 1
- 4
5
votes
3 answers
How to implement vertical tabs in QT?
I am trying to implement vertical tabs with horizontal text with QT but I cannot find any similar option in QTabWidget.
Somebody in SO asked for something similar here, however, the answers contain broken links and I doubt that they present a real…

Bub Espinja
- 4,029
- 2
- 29
- 46
5
votes
1 answer
How to custom QTabWidget tab?
The problem is:
Customer panel is derived from QTabWidget and has some tabs with some widget's
in which operator (person) can edit data. When data is changed in any widget
I check it, and i set bold font in QLabel that is "buddy" for this widget.…

824810885
- 61
- 1
- 4
5
votes
1 answer
Hiding bottom line in QTabBar
There doesn't seem to be a way of setting a stylesheet for the bottom line (shown in the image below) of a QTabBar, which I want to be removed.
How can I remove it?

TatianaP
- 177
- 2
- 10
4
votes
1 answer
expanding tabs to full window size?
I've been struggling with something related to tabs for a few days now. I'm trying to make it so that the tab bar I have in my application extends across the full width of the window size. I’m working with both MacOS and Ubuntu, and while the final…

bag531
- 179
- 1
- 9
3
votes
1 answer
QTabWidget tabPosition when using stylesheets
I'm currently using stylesheets to theme an application.
Here is the stylesheet I use for QTabWidget:
/*QTabBar et QTabWidget*/
QTabBar::tab {
background: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(73, 73, 74, 255),…

X99
- 905
- 10
- 24
3
votes
0 answers
PyQt5: Can't see close buttons in QTabBar
I can't see the close button on individual tabs when using PyQt5. I can close the individual tabs when I click where I know the close button should be, but can't see the button outright:
#!/bin/python3
import sys
from PyQt5.QtWidgets import…

Jon E
- 99
- 7