QT GUI Tab Widgetqtgui_tab_widgetQT GUI Widgetsfrom PyQt4 import Qt#set $win = 'self.%s'%$id
Qt.QTabWidget()
#set $all_labels = [$label0, $label1, $label2, $label3, $label4][:int($num_tabs())]
#for i, label in enumerate($all_labels)
self.$(id)_widget_$(i) = Qt.QWidget()
self.$(id)_layout_$(i) = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.$(id)_widget_$(i))
self.$(id)_grid_layout_$(i) = Qt.QGridLayout()
self.$(id)_layout_$(i).addLayout(self.$(id)_grid_layout_$(i))
$(win).addTab(self.$(id)_widget_$(i), $label)
#end for
$(gui_hint()($win))Num Tabsnum_tabs1enumLabel 0label0Tab 0string#if int($num_tabs()) > 0 then 'none' else 'all'#Label 1label1Tab 1string#if int($num_tabs()) > 1 then 'none' else 'all'#Label 2label2Tab 2string#if int($num_tabs()) > 2 then 'none' else 'all'#Label 3label3Tab 3string#if int($num_tabs()) > 3 then 'none' else 'all'#Label 4label4Tab 4string#if int($num_tabs()) > 4 then 'none' else 'all'#GUI Hintgui_hintgui_hintpart
This block creates a tabbed widget to organize other widgets. \
The ID of this block can be used as the tab_id in the GUI hints of other widgets.
The GUI hint can be used to position the widget within the application. \
The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \
Both the tab specification and the grid position are optional.