Arrange tabs in pyqt4

1

Good afternoon everyone! What command do I use to "break" the line of tabs? I would like to have, for example, 3 tabs in one row and 3 tabs just below it. The skeleton I have referring to the 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") 
    
asked by anonymous 04.09.2018 / 18:13

1 answer

0

QT does not have this object, so you would have to do manually :

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

That said, I recommend that you rethink the use of this kind of dialogue, which is terrible! Think of a bad window to move:

    
04.09.2018 / 20:17