Questions tagged [qtabbar]

QTabBar is a class from the Qt Toolkit which provides a tab bar, e.g. for use in tabbed dialogs.

Documentation can be found here (Qt4) and here (Qt5).

95 questions
1
vote
1 answer

Show close button (x) after hiding it (QTabBar)

I'm creating a method to hide and show the close button of a tab. I found a way to hide it. However, I don't know how to do it in reverse. This is my existing code for hiding the close button. Using the same lines of codes, how can I show the close…
Tenserflu
  • 520
  • 5
  • 20
1
vote
1 answer

PyQt QTabBar is not creating new tabs

I am trying to add new tabs into a QTabBar and it has been unsuccessful. What I am trying to achieve is that when you click onto the 'add' icon, there will be 3 menu items. Depending on which item is selected, it will create a new tab besides the…
Teh Ki
  • 455
  • 1
  • 3
  • 14
1
vote
1 answer

QTabWidget - Horizontal Tabs (when TabPosition=West)

I have a QTabWidget, which has another QTabWidget in every tab. The main QTabWidget's tabPosition is set to West. Is there an easy way to make the tabs horizontal without subclass the QTabWidget (to change paint-event etc.) ?
erniberni
  • 313
  • 5
  • 17
1
vote
1 answer

With PyQt4, why does setting a tabwidget tabbar icon widget to a label with an animated QMovie sometimes cause the animation to pause? [With Testcase]

I have a QMainWindow with a QTabWidget. From the QTabWidget, you can get a QTabBar and the set the QTabBar's TabButton as per https://doc.qt.io/archives/qt-4.8/qtabbar.html#setTabButton So, I'd like to do this to put a throbber (animated gif) next…
EB.
  • 3,383
  • 5
  • 31
  • 43
1
vote
1 answer

Qt invert tab QTabWidget?

I'm looking to invert the tabs in Qt Designer. That is I'm looking to change the tabs from the QTabWidget standard: /--tab1--\/--tab2--\________________ to \--tab1--/\--tab2--/************************ Where that tab goes into the content, rather…
Dave Lass
  • 115
  • 1
  • 8
1
vote
0 answers

Text not centered inside the last tab bar (Qt)

I have this gfx bug : The text "AUDIO" of the Tab 2 is not centered text of tab 2 is not centered (screenshot) I have this bug only on Mac when I add the log out button like that inside the MainWindow's constructor…
John Smith
  • 43
  • 1
  • 5
1
vote
0 answers

How to get previous tab index of QTabBar on currentChanged

I have a dialog with a QTabBar that is used to display and edit some information contained in other widgets of the dialog. The idea was when the tab is changed, the currentChanged signal could be emitted, then used to save the data that was…
pbreach
  • 16,049
  • 27
  • 82
  • 120
1
vote
3 answers

Inherit custom TabBar and implementation of resizeEvent

I'm inserting and removing tabs dynamically via QSpinBox which works fine. To fill the whole width of the screen (800px) I need to expand the tabs using my own eventFilter: mainwindow.h namespace Ui { class MainWindow; } class CustomTabBar : public…
MichaW.
  • 37
  • 5
1
vote
0 answers

How to customize a QDockWidget's QTabBar?

I am talking about this : How to get the QTabBar when my QDockWidgets are docked? I'd like to replace it with a customized one. The only thing I found for QDockWidget using a QTabBar was in the sources, a class named QDockAreaLayoutInfo. But it…
IAmInPLS
  • 4,051
  • 4
  • 24
  • 57
1
vote
2 answers

How To Style Qt's Tab Bar Background on OSX

With Qt on OSX, is there a way to change the dark tab bar background color inside the QTabWidget? I've tried all kinds of QSS stylesheet stuff and can change everything but that. Maybe I can do it by intercepting and the palette? Maybe I can…
Volomike
  • 23,743
  • 21
  • 113
  • 209
1
vote
0 answers

QTabBar keep last tab fixed

I added a "new tab" button to the right tab using the QTabWidget addTab method. On multiple tabs a truncated tab bar shown and hides the last tab. I tried to set the QTabBar::setUsesScrollButtons(false); But the TabWidget width get expanded. How…
Simon
  • 1,522
  • 2
  • 12
  • 24
1
vote
1 answer

Change color of purple tab text in Konsole CSS

When input comes in on a tab that is not active, the text for the tab changes to a purple color. What CSS selectors do I need to use to change this? I am using a custom stylesheet in Konsole to change how the tabs look, but can't figure out how to…
zli
  • 83
  • 7
1
vote
2 answers

QTabBar strange line doesn't disappear

I have created this interface: My Question is: HOW TO GET RID OF THAT OBSOLETE LINE using my stylesheet. The black frame (objectname= mainTabBarWidget(QWidget)) is laid out vertically. It has a Fixed height (38px) and contains these elements from…
Fethi Dilmi
  • 161
  • 3
  • 16
1
vote
1 answer

How to have width of tabs change with text inside using width: auto; in QTabBar::tab in Qt5?

I have a QTabBar with several tab panes styled with the following: QTabBar::tab { background: gray; color: white; width:auto; height:1em; border:0px; border-top-left-radius:8px; …
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
1
vote
1 answer

Why can't I compare a QTabWIdget::TabPosition with myTabWidget->tabPosition?

I am making a custom tab bar, which sits in a custom tab widget. I wish to take certain actions depending on the QTabPosition. Therefore I have the following code: // get the parent tab widget QTabWidget* pTabWidget =…
crobar
  • 2,810
  • 4
  • 28
  • 46