Organize tabs in pyqt4

Asked

Viewed 25 times

0

Good afternoon, you guys! What command do I use to "break" the line of tabs? I would like 3 tabs to appear on a line and 3 tabs just below it. The skeleton I have regarding tabs is:

    # layout tab   
    tabs = qg.QTabWidget()

    # Create tabs
    tab1    = qg.QWidget()  
    tab2    = qg.QWidget()
    tab3    = qg.QWidget()
    tab4    = qg.QWidget()
    tab5    = qg.QWidget()
    tab6    = qg.QWidget()

    tabs.addTab(tab1,"Properties")
    tabs.addTab(tab2,"Nodes")
    tabs.addTab(tab3,"Bars")
    tabs.addTab(tab4,"Restrains") 
    tabs.addTab(tab5,"Nodal Loads") 
    tabs.addTab(tab6,"Dist.Loads") 
  • It does not do this: http://hallofshame.gp.co.at/tabs.htm

1 answer

0

QT doesn’t have that object, so you’d have to do manually:

Create a vertical layout, place one QStackedWidget and several QTabBars. You will have to manually define methods to ensure that only one tab is selected in all QTabBar and show the correct content on QStackedWidget.

That said, I recommend rethinking the use of this kind of dialogue, which is terrible! Think of a bad window to stir:

varias abas

Browser other questions tagged

You are not signed in. Login or sign up in order to post.