vcl/qt5/QtBuilder.cxx | 15 ++++++++++----- vcl/qt5/QtInstanceBuilder.cxx | 1 + 2 files changed, 11 insertions(+), 5 deletions(-)
New commits: commit 72179cb1476e8f227d28f62f4e509fc6b11c5bfd Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 4 10:55:42 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 4 21:45:06 2026 +0100 tdf#130857 qt weld: Support "Text along Path" dock/dialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. The dialog can be triggered like this: * start Draw * insert a text box using "Insert" -> "Text Box", then clicking and dragging to position it * type "Hello world" into the text box * select the text * "Format" -> Text along Path" Instead of having a standalone dialog, this can also be docked, e.g. by pressing Ctrl while double-clicking into some empty area at the top of the dialog. This is the first supported UI file using "GtkRadioToolButton", for which support was added in previous commit Change-Id: Ifec3c3558a6ba7b3909b74db6b73eef4acdf85e8 Author: Michael Weghorn <[email protected]> Date: Wed Feb 4 10:48:22 2026 +0100 tdf#130857 qt weld: Support "GtkRadioToolButton" Change-Id: I5fb5dde28d73edfb3a53f9661414252e13cae772 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198659 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index f5bc7ac43238..bb2ec683a377 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -337,6 +337,7 @@ constexpr auto SUPPORTED_WITH_QT_PARENT = frozen::make_unordered_set<std::u16str u"svt/ui/datewindow.ui", u"svt/ui/linewindow.ui", u"svx/ui/colorwindow.ui", + u"svx/ui/dockingfontwork.ui", u"svx/ui/formnavigator.ui", u"svx/ui/formnavimenu.ui", u"vcl/ui/editmenu.ui", commit 98a18cb09e5c000cc0d0dfcddfd00b4dbb7b9c61 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 4 10:48:22 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 4 21:45:00 2026 +0100 tdf#130857 qt weld: Support "GtkRadioToolButton" In QtBuilder, support "GtkRadioToolButton" objects in .ui files. As the GTK 3 documentation [1] says: > A GtkRadioToolButton is a GtkToolItem that contains a radio > button, that is, a button that is part of a group of toggle > buttons where only one button can be active at a time. As is done for "regular" radio buttons, use a QButtonGroup [2]. This will be used by Draw's "Format" -> "Text along Path" dialog. [1] https://docs.gtk.org/gtk3/class.RadioToolButton.html [2] https://doc.qt.io/qt-6/qbuttongroup.html Change-Id: Ifec3c3558a6ba7b3909b74db6b73eef4acdf85e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198658 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index b063c6585d69..b599f3b887bc 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -405,7 +405,8 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: { pObject = new QToolBar(pParentWidget); } - else if (sName == u"GtkToggleToolButton" || sName == u"GtkToolButton") + else if (sName == u"GtkRadioToolButton" || sName == u"GtkToggleToolButton" + || sName == u"GtkToolButton") { QToolButton* pToolButton = new QToolButton(pParentWidget); const OUString sIconName = extractIconName(rMap); @@ -415,7 +416,11 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: pToolButton->setIcon(toQPixmap(aImage)); } pToolButton->setText(toQString(extractLabel(rMap))); - pToolButton->setCheckable(sName == u"GtkToggleToolButton"); + pToolButton->setCheckable(sName == u"GtkRadioToolButton" + || sName == u"GtkToggleToolButton"); + if (sName == u"GtkRadioToolButton") + extractRadioButtonGroup(rId, rMap); + pObject = pToolButton; } else if (sName == u"GtkTreeView") commit 6ffebf4c544e8b9b06ea852993888b99fb70c1e5 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 4 10:36:03 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 4 21:44:53 2026 +0100 tdf#130857 qt weld: Use QAbstractButton in QtBuilder::setRadioButtonGroup Don't require QRadioButton in QtBuilder::setRadioButtonGroup but use its abstract base class QAbstractButton instead. This will allow to reuse the method when adding support for "GtkRadioToolButton" objects in .ui files in an upcoming commit. Those are no radio buttons, but toggle buttons. Change-Id: Ieafcd1d96769402fb5d3196f72cafd73421e5558 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198657 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 722a65bee3a1..b063c6585d69 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -644,8 +644,8 @@ void QtBuilder::setMnemonicWidget(const OUString& rLabelId, const OUString& rMne void QtBuilder::setRadioButtonGroup(const OUString& rRadioButtonId, const OUString& rRadioGroupId) { // insert all buttons into a button group owned by button whose ID matches the group's - QRadioButton* pGroupOwner = get<QRadioButton>(rRadioGroupId); - assert(pGroupOwner && "No radio button with the given group name"); + QAbstractButton* pGroupOwner = get<QAbstractButton>(rRadioGroupId); + assert(pGroupOwner && "No button with the given group name"); QButtonGroup* pButtonGroup = nullptr; static const char* const pPropertyKey = "PROPERTY_BUTTONGROUP"; @@ -660,7 +660,7 @@ void QtBuilder::setRadioButtonGroup(const OUString& rRadioButtonId, const OUStri pButtonGroup->addButton(pGroupOwner); } - QRadioButton* pRadioButton = get<QRadioButton>(rRadioButtonId); + QAbstractButton* pRadioButton = get<QAbstractButton>(rRadioButtonId); assert(pRadioButton && "No radio button with given ID"); pButtonGroup->addButton(pRadioButton);
