From 3cfe15a9c3db0993d8b8fef5d148625840e5a75c Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周二, 05 12月 2023 15:43:39 +0800 Subject: [PATCH] Add host interface --- src/widgets/widgetitemdelegate.cpp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/widgets/widgetitemdelegate.cpp b/src/widgets/widgetitemdelegate.cpp index 08b3804..9d338c1 100644 --- a/src/widgets/widgetitemdelegate.cpp +++ b/src/widgets/widgetitemdelegate.cpp @@ -31,6 +31,14 @@ return {originPoint, size}; } + QWindow *WidgetItemDelegate::hostWindow(QObject *host) const { + return static_cast<QWidget *>(host)->windowHandle(); + } + + bool WidgetItemDelegate::isHostSizeFixed(QObject *host) const { + return false; + } + bool WidgetItemDelegate::resetQtGrabbedControl() const { if (qt_button_down) { static constexpr const auto invalidPos = QPoint{-99999, -99999}; -- Gitblit v1.9.1