def new_tab(self, *args): """Spawn a new tab page""" layout = QtWidgets.QGridLayout() layout.setSpacing(1) layout.setContentsMargins(0, 0, 0, 0) widget = GlueMdiArea(self) widget.setLayout(layout) tab = self.tab_widget self._total_tab_count += 1 tab.addTab(widget, str("Tab %i" % self._total_tab_count)) tab.setCurrentWidget(widget) widget.subWindowActivated.connect(self._update_viewer_in_focus)
def new_tab(self): """Spawn a new tab page""" layout = QtWidgets.QGridLayout() layout.setSpacing(1) layout.setContentsMargins(0, 0, 0, 0) widget = GlueMdiArea(self) widget.setLayout(layout) tab = self.tab_widget self._total_tab_count += 1 tab.addTab(widget, str("Tab %i" % self._total_tab_count)) tab.setCurrentWidget(widget) widget.subWindowActivated.connect(self._update_plot_dashboard)