Questions tagged [qtabwidget]

The QTabWidget class, part of the Qt framework, provides a stack of tabbed widgets.

The QTabWidget class provides a stack of tabbed widgets. A tab widget provides a tab bar and a "page area" that is used to display pages related to each tab.

Qt documentation for QTabWidget can be found here for Qt 5 and here for Qt 4.8.

365 questions
3
votes
3 answers

Close button only on active tab of QTabWidget

To save space in a QTabWidget, I would like to show the close icon only for the current tab, like e.g. Firefox is doing: Is there a simple way using a style sheet, some thing like (not working like this) QTabBar::tab::!selected::close-button…
Tim Hoffmann
  • 1,325
  • 9
  • 28
3
votes
1 answer

QTabWidget: determine pages to be QTableWidget

MainWindow of my Qt application has QTabWidget, where each tab is a QTableWidget. I need to get access to the selected cell of a current table (with currentRow() and currentColumn()). But when I'm taking pointer to the table with…
Tami
  • 153
  • 2
  • 2
  • 11
3
votes
2 answers

Drag and drop tab from QTabWidget

I am trying to drag a tab from a tab widget and split the viewing area (- like eclipse does then you drag a tab heading into the edit area - and similar to the 'split vertically' functionality on a tab in PyCharm). I tried using drag and drop but…
Don Smythe
  • 9,234
  • 14
  • 62
  • 105
3
votes
1 answer

Inline renaming of a tab in QTabBar/QTabWidget

I really want to have a QTabWidget that can be renamed by double-click on tab caption. I have googled and found this solution, but it's more like an outline for a developer who knows his way through Qt and subclassing it's widgets. I'm kind of stuck…
Eduard Sukharev
  • 1,188
  • 2
  • 15
  • 37
3
votes
1 answer

PyQt: Reorder tabs in QTabWidget

I made my GUI using Qt Designer and I have a QTabWidget with multiple tabs. My tabs contain specific tools that are used in my app. Now I would like to set my tabs closable and movable so I could save the order of my tabs and load it when the app…
mursuhaukka
  • 65
  • 1
  • 5
3
votes
2 answers

How to color a PyQt QTabwidget

I have a PyQt main window that contains a QTabWidget. The tab widget contains a few buttons and text boxes. I'd like to color the entire tab background not just the tabs that stick up in the tab bar area. I'm not using style sheets and would prefer…
JohnSantaFe
  • 145
  • 1
  • 3
  • 11
3
votes
1 answer

Error trying to add widgets to QTabWidget

I wanted to make a window and add a QTabWidgets with the widgets I want to it. So I followed the Qt TabDialog example and from what I know, I followed the same path as in the example. Problem is I get this error while trying to add my widgets as…
Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140
2
votes
1 answer

How to reference a widget inside a specific tab of a QTabWidget?

I am using PyQt to make a GUI for a circuit simulator, and am programmatically creating and deleting tabs (i.e. the user clicks on a button, and a new tab is added to a QTabWidget). This is already working (I drew a QFrame in Qt Creator and, in my…
Renan
  • 462
  • 7
  • 24
2
votes
1 answer

PyQT - setting the text color for a QTabWidget

Is there any way to set the text color of a certain tab that's part of a QTabWidget? QTabBar seems to have a method to set the tab text color, but I do not see a similar method for QTabWidget.
MattyZ
  • 1,541
  • 4
  • 24
  • 41
2
votes
2 answers

How to use an event handler to detect clicking on the empty space after tab bar?

I have a QTabWidget, and I need to trigger an event when i press the area on the tab widget where you normally would see the tab name, accept its an empty space with no tab. Clicking the red area should trigger an event: Here is how the result…
FiveEight
  • 33
  • 4
2
votes
1 answer

qt tab widget white border on right and bottom

When i'm creating tab widget in qt i have white borders. I tried to delete this but when i'm adding stylesheet border: none i also have white borders on top and bottom For example i added tab widget and selected this style sheet: *{ background:…
Desync192
  • 71
  • 3
2
votes
1 answer

Add scroll bar into tab PYQT5

I wanted to create a scrollbar(pyqt5) into tab, base on example in link below I did some changes to fit my need but the scrollbar didn't show on tab and my charts become smaller. example PyQt4 - how to add scrollbar into tabbed windows of fixed…
Issac_n
  • 89
  • 1
  • 2
  • 13
2
votes
3 answers

QTabWidget insert a QSplitter can't switch when the splitter disabled

I insert a QFrame and QTabWidget in the QSplitter. And I wanna forbidden to adjust the size of elements in QSplitter. So I call method of 'setDisabled' in QSplitter. It's useful for disabling resizing the elements. But I also can't switch tab of…
Jason Liu
  • 23
  • 4
2
votes
0 answers

PyQt - save and restore dynamically added tabs with different types of widgets using QSettings

I am looking to save all of the info and restore on button click for my application using QSettings. I used code from How to save selected Items to Qsettings from QListWidget, QTableWidget The code from the accepted answer is edited to work for…
dree
  • 170
  • 1
  • 11
2
votes
0 answers

Tabs in different Files (as classes) with PyQt5

I didn´t find a example to put the different tabs of QTabWidget in different files. Just a Methode or as a new (child-)class. I´m a beginner in Python with QT and thought I can get a better overview if I put the different tabs in different…
dominikTO
  • 25
  • 4