示例#1
0
 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)
示例#2
0
文件: application.py 项目: pllim/glue
 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)