Skip to content

Commit

Permalink
fix: tab widget example showed in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
muyr authored and loonghao committed Jun 21, 2024
1 parent e5a7d80 commit dd88414
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/tab_widget_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from dayu_widgets.tab_widget import MTabWidget


class MTabWidgetTest(QtWidgets.QWidget):
class TabWidgetExample(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MTabWidgetTest, self).__init__(parent)
super(TabWidgetExample, self).__init__(parent)
self._init_ui()
self.resize(500, 500)

Expand All @@ -41,7 +41,7 @@ def _init_ui(self):
self.tab_closable.addTab(MLabel("test 1"), "标签一")
self.tab_closable.addTab(MLabel("test 2"), "标签二")
self.tab_closable.addTab(MLabel("test 3"), "标签三")
# self.tab_closable.tabCloseRequested.connect(self.slot_close_tab)
self.tab_closable.tabCloseRequested.connect(self.slot_close_tab)
main_lay.addWidget(MDivider("Normal"))
main_lay.addWidget(tab_card)
main_lay.addWidget(MDivider("Closable"))
Expand All @@ -64,6 +64,6 @@ def slot_close_tab(self, index):
from dayu_widgets.qt import application

with application() as app:
test = MTabWidgetTest()
test = TabWidgetExample()
dayu_theme.apply(test)
test.show()

0 comments on commit dd88414

Please sign in to comment.