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
2
votes
1 answer
Simple ribbon: how to use QActions within QTabBar?
I'm trying to implement simple tabbed interface with Qt5. I use QTabWidget with QToolBars placed inside its tabs and I add QActions to the QToolBars.
That works but causes the following issue: any action remains accessible only while its parent tab…

Vercetti
- 437
- 1
- 6
- 17
2
votes
2 answers
Using PyQt and Qt4, is this the proper way to get a throbber in a QTabWidget tab?
I have some code creating a QTabWidget from Python using PyQt4. I want to get a 'throbber' animated gif in the tab. The /only way/ I have found how to do this is the following convoluted method.
tabBar = self.tabReports.tabBar()
lbl =…

EB.
- 3,383
- 5
- 31
- 43
2
votes
1 answer
QTabBar to preserve tab position
In my app I have a QTabBar widget that uses scroll buttons if there are many tabs.
Now, on currentChanged(int) signal I call a method that renames previous and current tab (calls setTabText()).
Unfortunately this repaints whole QTabBar and as a…

bkarasm
- 213
- 1
- 6
2
votes
1 answer
Disable secondary scroll button (tear indicator?) in QTabBar
I have a QTabBar looking like this. The screenshot does not show the arrow scroll buttons on its right side. What is the thing on left side called (looking like a torn edge)? It serves as a scroll left button. Is it the tear indicator? I found…

Horst Walter
- 13,663
- 32
- 126
- 228
2
votes
2 answers
Change color of QTabWidget tab's
I want to customize a QTabWidget, so that every tab has it's own background color. I know, that this cannot be done with stylesheets, so I subclassed QTabBar and changed it's paintEvent. Then, I replaced the default QTabBar of QTabWidget with my own…

user2494129
- 717
- 2
- 13
- 24
2
votes
0 answers
Qt Naming dock widget area tabbar
I work on a C++ application using Qt 5.1.0. We have a main window and several Dock Widgets. These can be put in the left main window area. If several widgets are put in that area, they become tabbed. These tabs are controlled by a QTabBar which I…

Perkulator
- 21
- 1
2
votes
1 answer
Qt, making UI that shrinks and expands
I'm trying to learn how to create the layout of my Qt Symbian application so that it will expand/shrink and fit into the screen size of different devices.
In my default ui I have added a QTabWidget with five tabs that I want to fit into the screen…

Martin
- 1,675
- 11
- 34
- 46
2
votes
2 answers
Change background color of QTabWidget tabs
Is it possible in PYQT4 to change the background color of tabs for a QTabWidget? There is a way to change the color of the text but not the background color of the tab.
I have a program with multiple tabs, and I want to give each level its own…

Nader
- 660
- 1
- 11
- 17
1
vote
1 answer
Truncated tab bar in Qt
On this site
there is a picture with two "tab-systems".
I would like to have the second one, which is described as "A truncated tab bar shown in the Plastique widget style." There you have arrows, which allow you to slide through the tabs.
I have…

buddy
- 821
- 2
- 12
- 30
1
vote
1 answer
Tab size of QTabBar in QMdiArea
My QMainWindow is using QMdiArea. The viewMode of the QMdiArea is set to TabbedView. The Tab size of MdiArea takes entire width of the MdiArea:
If more tabs are added, they divide MdiArea width and consume entire width:
I understand that the…

Ajay
- 344
- 3
- 15
1
vote
2 answers
How to make all tabs in QTabBar not been selected?
How to make all tabs in QTabBar not been selected?
Thank you.

typbl4
- 141
- 8
1
vote
2 answers
Force QTabBar tabs to stay as small as possible and ignore sizeHint
I'm trying to have a + button added to a QTabBar. There's a great solution from years ago, with a slight issue that it doesn't work with PySide2. The problem is caused by the tabs auto resizing to fill the sizeHint, which in this case isn't wanted…

Peter
- 3,186
- 3
- 26
- 59
1
vote
1 answer
how to pair creating new tabs with editing
My problem start when i try some options to pair this two scripts but it only ends with TypeError: init() missing 1 required positional argument: 'parent'
Even my friend try to help but it end with similar errors becouse he have skills in C++
import…

Jaceg
- 45
- 6
1
vote
1 answer
Qt Widgets do not get showEvent() when tabbed in dock area of QMainWindow
In QMainWindow, when few widgets are tabbed together in dock area, how can I detect when a tab has been toggled by user? It is not a problem when I have an instance of QTabWidget created by myself and can attach a handler to currentChanged(), but…

def
- 521
- 4
- 16
1
vote
1 answer
How can I center the icons in a QTabBar?
I'm trying to change the style for a QTabWidget. I would like to reduce the gap between the icon and text in each tab, and center both.
This is what I have now:
This is what I want:
My current stylesheet is:
stylesheet = """
QTabBar {
…

PiRK
- 893
- 3
- 9
- 24