diff --git a/src/superqt/collapsible/_collapsible.py b/src/superqt/collapsible/_collapsible.py index c684c58c..7bd53c06 100644 --- a/src/superqt/collapsible/_collapsible.py +++ b/src/superqt/collapsible/_collapsible.py @@ -66,8 +66,7 @@ def __init__( def setText(self, text: str) -> None: """Set the text of the toggle button.""" - current = self._toggle_btn.text() - self._toggle_btn.setText(current + text) + self._toggle_btn.setText(text) def text(self) -> str: """Return the text of the toggle button."""