From 56f65ff123ce3beee664eff2ef4ffc5f1fd0e69f Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 6 Mar 2024 15:27:56 -0500 Subject: [PATCH] feat: make toggle button public in QCollapsible (#232) --- 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)