From 773e467c446ce6df479fe5f41ea0c2a27793671b Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 14 Feb 2024 13:43:31 -0500 Subject: [PATCH] feat: make toggle public --- src/superqt/collapsible/_collapsible.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/superqt/collapsible/_collapsible.py b/src/superqt/collapsible/_collapsible.py index 89d85510..ea3d153d 100644 --- a/src/superqt/collapsible/_collapsible.py +++ b/src/superqt/collapsible/_collapsible.py @@ -66,6 +66,10 @@ def __init__( _content.layout().setContentsMargins(QMargins(5, 0, 0, 0)) self.setContent(_content) + def toggleButton(self) -> QPushButton: + """Return the toggle button.""" + return self._toggle_btn + def setText(self, text: str) -> None: """Set the text of the toggle button.""" self._toggle_btn.setText(text)