summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-05 15:32:20 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-06 18:59:21 +0100
commit225b902ad3f61a7456dd88ed116ffc4488f231f1 (patch)
tree9bdc72a68b955916088f133b5e663afa690fa578 /vcl/qt5
parent790749fde3a008047d1aa20eb6db0d00d2c355de (diff)
tdf#130857 qt weld: Implement QtInstanceWidget::weld_parent
Change-Id: Ie26a40badb891f17b26b9e9202709a3edb909a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176089 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtInstanceWidget.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/qt5/QtInstanceWidget.cxx b/vcl/qt5/QtInstanceWidget.cxx
index 5f3590bd88d9..6764c83422d2 100644
--- a/vcl/qt5/QtInstanceWidget.cxx
+++ b/vcl/qt5/QtInstanceWidget.cxx
@@ -8,6 +8,7 @@
*/
#include <QtInstanceWidget.hxx>
+#include <QtInstanceContainer.hxx>
#include <vcl/transfer.hxx>
#include <vcl/qt/QtUtils.hxx>
@@ -402,7 +403,14 @@ void QtInstanceWidget::thaw() {}
void QtInstanceWidget::set_busy_cursor(bool) {}
-std::unique_ptr<weld::Container> QtInstanceWidget::weld_parent() const { return nullptr; }
+std::unique_ptr<weld::Container> QtInstanceWidget::weld_parent() const
+{
+ QWidget* pParentWidget = m_pWidget->parentWidget();
+ if (!pParentWidget)
+ return nullptr;
+
+ return std::make_unique<QtInstanceContainer>(pParentWidget);
+}
void QtInstanceWidget::queue_resize() {}