qtquick: Implement View::windowHandle() and Window_qtquick::rootView()

For QtWidgets it now calls create() in the ctor so we have a window
during tests.
This commit is contained in:
Sergio Martins
2022-05-01 14:38:20 +01:00
parent 545c45e78d
commit 738a78d12b
6 changed files with 57 additions and 4 deletions

View File

@@ -26,11 +26,14 @@ namespace KDDockWidgets {
class TestView_qtwidgets : public Views::View_qtwidgets<QWidget>
{
public:
using Views::View_qtwidgets<QWidget>::View_qtwidgets;
explicit TestView_qtwidgets(QWidget *parent)
: Views::View_qtwidgets<QWidget>(nullptr, Type::None, parent)
{
create();
}
};
}
Platform_qtwidgets::Platform_qtwidgets(int argc, char *argv[])
: Platform_qt(argc, argv)
{
@@ -54,7 +57,7 @@ View *Platform_qtwidgets::tests_createView(View *parent)
{
QWidget *parentWidget = Views::View_qtwidgets<QWidget>::asQWidget(parent);
auto newWidget = new TestView_qtwidgets(nullptr, Type::None, parentWidget);
auto newWidget = new TestView_qtwidgets(parentWidget);
return newWidget;
}