As mentioned for Math's "Format" -> "Spacing" dialog in
previous commit
Change-Id: I3018c5a76cd863332ac8560a926105ae76327a38
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Apr 11 10:31:09 2025 +0200
tdf#130857 qt weld: Support Math's "Spacing" dialog
for the case of using native widgets with the qt6 VCL plugin:
> Currently, the image isn't always updated when choosing
> a different category via "Category" menu button. This
> will be addressed in a separate commit.
For some reason (not further analyzed so far), no
QApplication::focusChanged signal gets emitted (that would then
trigger the slot in QtInstanceWidget::applicationFocusChanged)
for the following scenario:
* start Math with the qt6 VCL plugin and environment variable
SAL_VCL_QT_USE_WELDED_WIDGETS=1 set
* open the "Format" -> "Spacing" dialog
* while the focus is still on the "Spacing" spinbox, click the
"Category" menu button and select another category, e.g. "Operators"
The problem cannot be observed when first moving focus away
from the "Spacing" spinbox.
To make sure the image gets updated, explicitly call
the SmDistanceDialog::SetCategory
Call the `GetFocusHdl` handler in SmDistanceDialog::SetCategory
after setting focus to the spinbutton which makes this work
for the case of using native widgets with qt6 as well.
Change-Id: Ia4a1389a014f22c9c1665093321b231838ad1215
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184026
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins