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
4
votes
2 answers

QTabWidget. How to move one tab to right position?

Standard layout tabs from left to right. All tabs are nearby. How to change the position of the one tab, so that it was attached to the right edge? Like This: Is it possible to do?
Massimo
  • 836
  • 3
  • 17
  • 38
4
votes
2 answers

How to add tabs dynamically in a Qt?

I want to add tabs dynamically in a Qt application depending on user inputs. One tab is to be there all the time by default. For convenience, it would be great if I could create the layout and features of this tab in the graphic editor. Then I…
user3050215
  • 185
  • 1
  • 5
  • 14
4
votes
2 answers

Python: How to share the same widget

There is QTabWidget with two Tabs: 'A' and 'B'. And there is a listWidgetA = QtGui.QListWidget() which I want to share among 'A' and 'B'. So far I was unable to find a way to assign listWidgetA to two different layouts. Assigning it to one layout…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
4
votes
3 answers

Styling QTabWidget

I have a QTabWidget with a background gradient and two problems. How dow I remove the anoying outline around the active tab (see image)? I tried "outline: none" like with push buttons but it does not seem to have an effect. How do I style disabled…
Oliver
  • 2,864
  • 1
  • 16
  • 27
3
votes
1 answer

Signals not being detected for QTabWidget

My implementation of QTabWidget is not detecting its tabCloseRequested() and currentChanged() signals. TileSheetManager::TileSheetManager(QWidget *parent) : QTabWidget(parent) { int w = WIDTH; int h = HEIGHT; this->setMinimumSize(w,…
Rikonator
  • 1,830
  • 16
  • 27
3
votes
2 answers

PyQt: Editable QTabWidget tab text

I can rename tab label programmatically. With QInputDialog I can get new label text and set tab widget label. But, I hope for a more user-friendly solution like double-clicking on label and get editing on the tab itself. A QListWidgetItem with…
Hyun-geun Kim
  • 919
  • 3
  • 22
  • 37
3
votes
1 answer

QTabWidget tabPosition when using stylesheets

I'm currently using stylesheets to theme an application. Here is the stylesheet I use for QTabWidget: /*QTabBar et QTabWidget*/ QTabBar::tab { background: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(73, 73, 74, 255),…
X99
  • 905
  • 10
  • 24
3
votes
1 answer

Why does my corner-widget not show up in QTabWidget?

I have a QTabWidget and I would like to have two push buttons in the top right corner. I use this code to add a vertical Layout as the corner widget and add two buttons to it: QWidget* cornerWidget = new QWidget(); QVBoxLayout* vbox = new…
Zciurus
  • 786
  • 4
  • 23
3
votes
1 answer

Call and use a QtabWidget defined in the main class, in another class

I have prepared a little script to illustrate my problem. In fact I would like the button contained in tab 1 (Tab 1) to show me tab 4 (Tab 4). The QTabWidget is contained in the main class (CLASSE_Main) and I'm calling it from class 1 (CLASSE_1). I…
ekdmekdm
  • 171
  • 1
  • 9
3
votes
3 answers

QTabWidget refusing to auto-resize

I'm attempting to have the following layout in qtcreator: QWidget QSplitter QStackedWidget ... QStackedWidget QWidget (page) QTabWidget Every single control that has a sizePolicy is set to Expanding. Despite this,…
Reinderien
  • 11,755
  • 5
  • 49
  • 77
3
votes
1 answer

QtabWidget and QMainWindow in one class

Is there a way to define the menubar in a QtabWidget class ? I wrote a code for a destopapplication with pyqt5 and python 3.6. I would like to set the manuBar in the same class as the Tabs but my code returns qtabwidget has no attribute…
Mady
  • 443
  • 7
  • 19
3
votes
3 answers

How to change text alignment in QTabWidget in C++?

This is the same question as in: How to change text alignment in QTabWidget? I tried to port that python code into C++ but it doesn't seem to work. Here is header file: #include class HorizontalTabWidget : public QTabBar { …
ashagi
  • 394
  • 6
  • 15
3
votes
1 answer

Make every tab the same width and also expandable

I'm trying to achieve something like the tabs from a Browser. All tabs must have the same width and also be expandable so when there are a lot of them they need to resize and fit the window (exactly like Chrome or Firefox does). The Problem: If a…
Carlos Barros
  • 319
  • 1
  • 6
  • 11
3
votes
1 answer

dynamically style an individual tab in QTabWidget

How can I individually and dynamically access a single tab (not its content resp. the widget in the tab) for styling purposes, such as changing the background color or adding graphical effects to it? An application could be to notify the user, that…
CatPlusPlus
  • 118
  • 8
3
votes
1 answer

How to get currentTabName from QTabWidget on Qt?

QTabWidget has a property called currentTabName. How can I access the currentTabName by code? I need to check what tab is selected, but I can't use the tab text (tabText) because it is translatable and may change and I don't want to use the tab…
KelvinS
  • 2,870
  • 8
  • 34
  • 67