vcl/qt5/QtInstanceBuilder.cxx | 1 + vcl/qt5/QtInstanceWidget.cxx | 8 ++++++++ 2 files changed, 9 insertions(+)
New commits: commit 49a124f9536b67f8439797832952aceed4fa3ef1 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 10 10:54:44 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 10 23:51:13 2026 +0100 tdf#130857 qt weld: Support "Interactive Screenshot Annotation" dlg 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. Description of how the dialog can be triggered [1]: > To create dialog screenshots from running LibreOffice, you need to > activate screenshotting mode (akin to experimental mode) in Tools ▸ > Options ▸ Advanced ▸ Open Expert Configuration, the relevant > configuration key is org.openoffice.Office.Common.Misc.ScreenshotMode. > Once screenshotting mode is active, right mouse click into any dialog > action area (where "OK", "Cancel" etc. buttons are) will make a context > menu appear: > > Click Screenshot item of the context menu to create screenshot of the > current dialog. Since the logic to trigger this dialog from an existing dialog is currently not implemented for the qt weld case, the dialog can currently only be triggered for other dialogs that do not use native Qt widgets yet, e.g. the "Format" -> "Page Style" dialog in Writer. [1] https://wiki.documentfoundation.org/Documentation/Screenshots#Creating_screenshots_manually Change-Id: I3373f0ea7a19f46eb81526ee7725937e59285161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199044 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 08786982c873..ee680aae93c2 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -99,6 +99,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set<std::u16string_vi u"cui/ui/queryduplicatedialog.ui", u"cui/ui/querysavelistdialog.ui", u"cui/ui/queryupdategalleryfilelistdialog.ui", + u"cui/ui/screenshotannotationdialog.ui", u"cui/ui/searchattrdialog.ui", u"cui/ui/securityoptionsdialog.ui", u"cui/ui/selectpathdialog.ui", commit 93ca00ff63f7cb94c161a8b40519dad683261659 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 10 10:47:20 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 10 23:51:04 2026 +0100 tdf#130857 qt weld: Emit events for mouse enter/leave Forward QEvent::Enter and QEvent::Leave as corresponding MouseEvents with the MouseEventModifiers::ENTERWINDOW and MouseEventModifiers::LEAVEWINDOW flags set. Only those flags themselves seem to be of relevance, so just pass default values for the other params of the MouseEvent ctor. (Some more information would be available at least via the QEnterEvent for the QEvent::Enter case, so that could still be extended later if necessary.) This is needed e.g. in Picture::MouseMove (cui/source/dialogs/screenshotannotationdlg.cxx) to detect whether the mouse is over the screenshot, once support for native Qt widgets for that dialog is declared, which will happen in an upcoming commit. Description of how the dialog can be triggered [1]: > To create dialog screenshots from running LibreOffice, you need to > activate screenshotting mode (akin to experimental mode) in Tools ▸ > Options ▸ Advanced ▸ Open Expert Configuration, the relevant > configuration key is org.openoffice.Office.Common.Misc.ScreenshotMode. > Once screenshotting mode is active, right mouse click into any dialog > action area (where "OK", "Cancel" etc. buttons are) will make a context > menu appear: > > Click Screenshot item of the context menu to create screenshot of the > current dialog. [1] https://wiki.documentfoundation.org/Documentation/Screenshots#Creating_screenshots_manually Change-Id: Ib44eb45e60e16012195e36e5882820859e634e7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199043 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtInstanceWidget.cxx b/vcl/qt5/QtInstanceWidget.cxx index 6bd2573867c6..00a101e6b0bb 100644 --- a/vcl/qt5/QtInstanceWidget.cxx +++ b/vcl/qt5/QtInstanceWidget.cxx @@ -316,6 +316,10 @@ bool QtInstanceWidget::eventFilter(QObject* pObject, QEvent* pEvent) m_pDropTarget->handleDropEvent(*pDropEvent); return true; } + case QEvent::Enter: + { + return signal_mouse_motion(MouseEvent({}, 0, MouseEventModifiers::ENTERWINDOW)); + } case QEvent::KeyPress: { QKeyEvent* pKeyEvent = static_cast<QKeyEvent*>(pEvent); @@ -326,6 +330,10 @@ bool QtInstanceWidget::eventFilter(QObject* pObject, QEvent* pEvent) QKeyEvent* pKeyEvent = static_cast<QKeyEvent*>(pEvent); return signal_key_release(toVclKeyEvent(*pKeyEvent)); } + case QEvent::Leave: + { + return signal_mouse_motion(MouseEvent({}, 0, MouseEventModifiers::LEAVEWINDOW)); + } case QEvent::MouseButtonDblClick: case QEvent::MouseButtonPress: {
