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
2
votes
1 answer

The case of the disappearing QWidgets

I've noted some rather inscrutable behaviour from QTabWidget. I'm trying to detach and reattach tabs, and that works fine, except if I programmatically select a widget after reattaching it, all its children disappear! No about of update() or…
Zendel
  • 485
  • 3
  • 14
2
votes
0 answers

Setting initial size of QTabWidget

I am creating a QTabWidget that has a number of tabs and each tab contains a different number of push buttons. Because some of these tabs may include many push buttons, I would like to make each tab scrollable. I have an implementation that sort of…
user2180977
  • 401
  • 3
  • 14
2
votes
1 answer

Adding button to QTabWidget tabs

I have created a QTabWidget and its tab count is changing dynamically when a signal is triggered. I have added tabs like: QWidget *centralWidget = new QWidget(); ui->tabWidget->addTab(centralWidget, "tab header"); Everything is OK by now, but the…
thehilmisu
  • 342
  • 1
  • 5
  • 13
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
2
votes
2 answers

How can we fetch the height of title of a QTabWidget

Is there any possible way to fetch the height of the title bar that comes in a QTabWidget?
Abhishek
  • 338
  • 5
  • 20
1
vote
1 answer

PySide QTabWidget resize event

LS I have a widget on a tabsheet. During setup of the app window the size of the tabsheet is used to determine the size for the widget. The widget size is then set to fully cover fill the tabsheet. When I resize the window the tab is also resized,…
ArtDijk
  • 1,957
  • 6
  • 23
  • 31
1
vote
1 answer

Styling QTabWidget background with CSS

I wish to set a custom background color for active QTabWidget tab. Unfortunately, I can't figure out the desired selector. On Linux the following hack works: QTabWidget::tab > QWidget > QWidget { background: #fff; } But on Windows I have to…
krojew
  • 1,297
  • 15
  • 38
1
vote
1 answer

How to display tab widget corner widget on the left/right side?

I have a QTabWidget with its tabs on the West, then I tried to add a corner widget to it, but it did not appear. If I set the tabs position to North or South, the corner widget gets displayed, but not on the side. Here's an MRE: QWidget *w = new…
1
vote
2 answers

How to make different width of some tabs in qtabwidget?

In my project there is a QTabWidget with 5 tabs, using styleSheet I changed style of whole widget, but some tabs become small for text in them. How to make individual width for some tabs? As you can see, first 3 tabs have normal width, but last 2…
John_2202
  • 45
  • 5
1
vote
0 answers

Adding tab to QTabWidget on button click

I would like to be able to create new tabs in real time. To do this, I added the Add tab button, but when clicked, a new tab is not added. In addition, when you open a window, the tabs move well, and after pressing the button, they stop moving.…
1
vote
1 answer

How to change the color Qt QTabWidget tabs' background color in Windows?

I want to change the background color of QTabWidget tab background color. I managed it sub classing QTabBar and QTabWidget in my code then promote the QTabWidget to this new class. It works in my Ubuntu 18.04 machine using Qt 6.2.2 and Qt Creator…
Gokhan
  • 56
  • 4
1
vote
0 answers

Corner widgets overlap the tab in QTabWidget

I have added some widgets into the corner in a QTabWidget using setCornerWidget(), but there are still some problems. The corner widgets overlap the tab. How can I set some margin to keep them away from tabs? The corner widgets stay at the bottom…
1
vote
2 answers

How to populate a QTextEdit, that is inside a QTabWidget, by opening a text file? [pyqt5, python]

I am trying to use the self.textedit = qtw.QTextEdit() widget that I declared from my MainWindow into my TextFileOpenedInNewTab class by doing this self.main_window = MainWindow() and using it like this…
1
vote
1 answer

PyQT5 & QtabWidget - changing values in different tabs

I've build a small PyQt5 application with a QtabWidget as my CentralWidget. Because I wanted to bring some structure into the code I create new tabs by using different classes. This works pretty fine so far. class…
Walter
  • 11
  • 1
1
vote
1 answer

How create method for get the child (QWebEngineView) of th curent view tab (QTabWidget)?

I'm trying to make some project with QTabWidget (a litle browser and a text editor with multiple tab like notepad++) but I'm stuck in 2 project when I try to edit a value of widget (QWebEngine or QTextEdit) inside of QTabWidget. This is the code for…