qtquick: Fix restoring QWindow's geometry
We need to resize the QWindow. Fixes issue #196
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user