qtquick: Fix restoring QWindow's geometry

We need to resize the QWindow.

Fixes issue #196
This commit is contained in:
Sergio Martins
2021-05-17 22:46:56 +01:00
parent 50f6e76e81
commit 2dbdb9f7eb
4 changed files with 29 additions and 2 deletions

View File

@@ -61,6 +61,16 @@ inline QWindow *windowForWidget(const QWidget *w)
DOCKS_EXPORT QWidget *widgetForWindow(QWindow *window);
/// @brief sets the geometry on the QWindow containing the specified item
inline void setTopLevelGeometry(QRect geometry, const QWidget *widget)
{
if (!widget)
return;
if (QWidget *topLevel = widget->window())
topLevel->setGeometry(geometry);
}
}
class FloatingWindow;