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
1
vote
2 answers
QStackedWidget inside QTabWidget tab?
In my QT application I use a QTabWidget for the base navigation. This QTabWidget I setup in the ui. In some of the tabs of the QTabWidget I need to have QStackedWidget to be able to "drill down in the view".
I tried adding the QStackedWidget inside…

Martin
- 1,675
- 11
- 34
- 46
1
vote
3 answers
QSS QTabBar text-align does not work
I try (font-weigth: works, but text-align: does not work):
QTabBar::tab:text{
font-weight:bold;
text-align:left;
}
I try, but it was also not working:
QTabBar::tab {
font-weight:bold;
text-align:left;
}
My QTabWidget:
-
…

Protomen
- 9,471
- 9
- 57
- 124
1
vote
1 answer
QTabBar neither expands totally nor spaces tabs equally
I want the tabbar to expand over the empty space until the right. And best would be if all tabs had the same width. I don't know how to do that as my stylesheets don't work and I can't find an option in the docs.
from PyQt4.QtGui import *
from…

user2366975
- 4,350
- 9
- 47
- 87
1
vote
1 answer
How to display list of opened tabs in Qt 4.8 on Ctrl+Tab
Is there any straightforward (without listening to key events) way to display the list of opened tabs in Qt, like following (in Visual Studio). I just want to make sure Qt does not offer such a feature, before implementing such a widget by myself.…

Morpheus
- 1,722
- 5
- 27
- 38
1
vote
0 answers
How do i get rid of this annoying line at the end of the QTabWidget
So i have a fairly simple style sheet to change the look of the tabs in my Qt app (i'm using PySide, but it shouldn't make much, if any, difference); here it is:
QWidget{
background: gray;
}
QTabBar{
background: gray;
}
QTabBar::tab {
…

will
- 10,260
- 6
- 46
- 69
0
votes
0 answers
pyqt5 tabifyDockWidget and hide the tabbar
Im creating a pyqt5 app that uses dockable widgets. The initial design used a stacked widget with nice buttons to switch pages. Ive been able to mimic the behavior by using tabifyDockWidget to place the pages in a dockable setting. I use the…

pyNewbie
- 155
- 1
- 2
- 10
0
votes
1 answer
QT: Position tabs within QTabBar block
There is a QTabBar element with a vertical size policy which is expanding. I want to make the tabs to be aligned to the bottom of the QTabBar element box, but they are always appearing from the top.
I have tried styling QTabBar and QTabBar::tab with…
user1598585
0
votes
0 answers
Manually setting the geometry of a QToolbutton messes with the clickable area of it
The idea that I am looking to apply in my code is the create an "Add Tab" button in my tab bar. The likes of which can be seen in any browser like chrome. This requires that I must update the position of the button depending on what is the last tab…

Sarim Charania
- 73
- 2
- 7
0
votes
0 answers
How to set a moveable "Add Tab (+)" button to PyQt Tab Bar?
In my program I am using QtTabWidget in which the user can dynamically add tabs as per their needs. I think that the norm of an "Add Tab (+)" Button is now defined by the way we see it in our web browsers like chrome. Which is why I would like to…

Sarim Charania
- 73
- 2
- 7
0
votes
2 answers
How to remove the distance between the QTabBar scroller buttons?
Please tell me why there is a distance between the QTabBar scroller buttons with a small width of the scroller buttons and how can this be fixed?
In this case, I have the following in the style sheet:
QTabBar::scroller {
width: 6px;
}
At the…

Helg1980
- 47
- 1
- 9
0
votes
1 answer
How to track the local position of a movable QTab?
I am currently attempting to set boundaries so that tabs cannot move beyond on each end of my QTabBar. By default the movable tab just disappears into void whenever it is dragged outside of the QTabBar's area -
An example of the QTab being dragged…

Nick Campbell
- 33
- 3
0
votes
1 answer
Is it possible to view the Python source code for PyQt5?
I am currently trying to access the source code for PyQt5's QTabBar Class but am not entirely sure how to do so. I've attempted using the inspect module and have examined the PyQt5-5.15.4.tar.gz file found on pypi.org, but I still haven't found the…

Nick Campbell
- 33
- 3
0
votes
2 answers
How to go to a q-tab using url (quasar framework)
I have three q-tab on top of the homepage. let's say car, bus, bike. if I click on the car tab it shows the car data, if clicked on the bus tab, it shows the bus data, if clicked on the bike tab it shows the bike data without refreshing the…

Hriju
- 728
- 1
- 16
- 27
0
votes
1 answer
PyQt5 - Missing close button icon in QTabBar
I'm trying to set my tabs "Closable", however I can't see the close button icon on individual tabs when using PyQt5 and "Fusion" style:
When I set "Windows" style I can see:
I already tried to use styleSheet qtabbar button but it didn't work:
…

nunoaomaia
- 21
- 6
0
votes
1 answer
QTabWidget Access Actual Tab (not the content widget)
In this image:
I would like to access the actual tabs, rather than the content, so I can set a QPropertyAnimation on the actual tab when it is hovered on. I know how to get the hover event working, and I can get the tab index on the hover, I just…

SamG101
- 488
- 1
- 7
- 18