Just a main widget with a tabs widget in it.
The problem is - when I run it, only part of tabs are shown (as shown on attached picture). So, you need to resize, or scroll tabs to get for the last.
How can I set it so that window shows all tabs from the start?
import sys
from PyQt4.QtGui import *
class MainWindow(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
# making tabs
tabs = QTabWidget()
tabs.addTab(QWidget(), '111111')
tabs.addTab(QWidget(), '222222')
tabs.addTab(QWidget(), '333333')
tabs.addTab(QWidget(), '444444')
# inserting in vbox
vbox = QVBoxLayout(self)
vbox.addWidget(tabs)
app = QApplication(sys.argv)
myapp = MainWindow()
myapp.show()
sys.exit(app.exec_())
How can I get it resized for all tabs?
And where the problem is - is it parent widget, or tabs, or vbox?