Introduce ViewWrapper - a non-owning view
In many cases we need to access widgets that weren't created by KDDW, in that case we have no View. Since all our APIs want to deal in View and not in QWidget, we need a way to wrap stuff like QWidget::window() and windowHandle() All methods are unimplemented. Will only implement those that are required/used.
This commit is contained in:
22
src/views_qtwidgets/ViewWrapper_qtwidgets.cpp
Normal file
22
src/views_qtwidgets/ViewWrapper_qtwidgets.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group
|
||||
company <info@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "ViewWrapper_qtwidgets.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
using namespace KDDockWidgets::Views;
|
||||
|
||||
ViewWrapper_qtwidgets::ViewWrapper_qtwidgets(QWidget *widget)
|
||||
: ViewWrapper()
|
||||
, m_widget(widget)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user