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

Add widgets into a QTabWidget

Can I add some widgets like QLabel and QPushButton into a QTabWidget? Actually, I want to do something like this: I'm using C++ and Qt. Thanks
KelvinS
  • 2,870
  • 8
  • 34
  • 67
8
votes
1 answer

Access the widget of a tab in a QTabWidget

I have a QTabWidget, where each tab has a QPlainTextEdit as its widget. So, how do I access each tab widget? How do I edit that widget?
Kazuma
  • 1,371
  • 6
  • 19
  • 33
8
votes
3 answers

pyqt5 tabwidget vertical tab horizontal text alignment left

Since pyqt doesn't have horizontal text in vertical tab option, I followed this link to make it happen. I wanted to have icons on the left and then text after icon and different color for selected tab text, inactive tabs text. Below code gets it…
Deadlyxda
  • 115
  • 1
  • 7
8
votes
1 answer

How to connect event when tab widget is selected?

I am using PyQt5 to make the user interface. Now I have set up a tab widget, and I want to trigger the event at such a time when a specific tab is selected. In other words, for example, I have tab A and tab B, and I want to execute the function…
Jarvis Du
  • 379
  • 1
  • 4
  • 15
8
votes
3 answers

Remove border lines from QFrame & QTabWidget

Please have a look at the attached image to understand the problem. In the image you can see, how can I remove the border lines or set their color to the QDialog color. Thanks.
Farrukh Arshad
  • 1,391
  • 2
  • 16
  • 26
7
votes
3 answers

QTabWidget set title font of only one tab

I've created a chat program with an Interface using QTabWidget. If there's an update in a tab i want to set the tabs title font to a bold font. With QTabWidget::font i can only set the font of the titles of all tabs.
Florian
  • 3,145
  • 1
  • 27
  • 38
7
votes
2 answers

How to embed terminal inside PyQt5 application without QProcess?

I have been struggling lately with embedding a terminal inside PyQt GUI app. Tried almost every search on Internet but nothing looks like of any help. I have a QTabWidget and I simply need one tab to have a terminal. Is it not at all possible to…
node_analyser
  • 1,502
  • 3
  • 17
  • 34
7
votes
2 answers

How to change text alignment in QTabWidget?

I cannot find a way to set the text alignment in a QTabWidget. After I've created an instance of this widget, I've set its tabPosition property to West, but I wish it showed text/label horizontally. I've given a look to the Qt's stylesheets, but as…
Markon
  • 4,480
  • 1
  • 27
  • 39
7
votes
1 answer

PyQT QTabWidget currentChanged

I'm trying to build a little app that loads several webpages in an QTabWidget. This already works well. Now I want the tabs / QWebViews to be reloaded when the current Tab is changed. I think that there is a problem connection the function…
user3272502
  • 71
  • 1
  • 1
  • 2
6
votes
3 answers

Qt4 expanding tabs in QTabBar

I am subclassing QTabWidget to add a QTabBar, who's tabs stretch over the whole width of the tabBar. Therefore I am setting the expanding property to true. This doesn't seem to change anything about the behavior of the tabs. Did anyone encounter the…
user636530
  • 63
  • 1
  • 4
6
votes
3 answers

In PyQt, is it possible to detach tabs from a QTabWidget?

Many professional applications (such as web browsers) give the user the ability to detach tabs from a tab bar. Surprisingly, Qt4 does not provide this functionality. Some might say that this functionality is provided by using tabified…
Blackwood
  • 357
  • 3
  • 14
6
votes
1 answer

Change Tab Size In QTabWidget

I recently learned about QTabWidget and tried using it in python. My question is, can I change the height, width and background of each individual tab? I tried doing self.Tab1.setStyleSheet("background: white") but that did nothing. Thanks in…
XzibitGG
  • 330
  • 5
  • 18
6
votes
8 answers

How to expand tabs in QTabWidget Qt

I have a QTabWidget like this one: But I want to expand the tabs to "fill" the entire widget width, like this: How can I do that? I am using Qt 5.3.2 and Qt Creator 3.2.1 Update: I tried to use the setExpanding…
KelvinS
  • 2,870
  • 8
  • 34
  • 67
6
votes
2 answers

How to access QTabWidget tab editor in Qt Designer - when I double click object name dialog pops up

I have a QTabWidget and I want to add/remove/rename individual tabs. Some sources claim that you can double click it to get a tab editor. When I double click it, I get the "Object name" popup: I need a similar editor like the one used for…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
6
votes
3 answers

QTabWidget size depending on current Tab

I've a QTabWidget, which contains widgets of different heights (their widths are fixed), however, the default implementation ofQTabWidget selects the biggest widget's height as own height. What I would like to know if there's a (possible fast) way…
ABu
  • 10,423
  • 6
  • 52
  • 103
1
2
3
24 25