summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-18 18:58:30 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-19 21:35:24 +0100
commit1052f5cd508a33c4cea3a89d16f03b53ebe18b40 (patch)
tree40619ef4d20a74c1910abf2e642c497b8b970efe /vcl/qt5
parent532618ae4e0f7bf8537c566421f59df473135d7d (diff)
tdf#130857 qt weld: Signal when toggle button gets toggled
Change-Id: Ia44a203a56a2b560a995446da2dd1c48a736bf60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180467 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtInstanceToggleButton.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/qt5/QtInstanceToggleButton.cxx b/vcl/qt5/QtInstanceToggleButton.cxx
index 696a463a4d71..eca59aa95f4a 100644
--- a/vcl/qt5/QtInstanceToggleButton.cxx
+++ b/vcl/qt5/QtInstanceToggleButton.cxx
@@ -15,6 +15,8 @@ QtInstanceToggleButton::QtInstanceToggleButton(QAbstractButton* pButton)
{
assert(pButton);
pButton->setCheckable(true);
+
+ connect(&getButton(), &QAbstractButton::toggled, this, &QtInstanceToggleButton::signalToggled);
}
void QtInstanceToggleButton::set_active(bool bActive)
@@ -46,4 +48,10 @@ bool QtInstanceToggleButton::get_inconsistent() const
return false;
};
+void QtInstanceToggleButton::signalToggled()
+{
+ SolarMutexGuard g;
+ signal_toggled();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */