Fix QtQuick build

This commit is contained in:
Sergio Martins
2021-09-04 20:11:35 +01:00
parent fafc0b7946
commit bffe671679
2 changed files with 16 additions and 1 deletions

View File

@@ -257,7 +257,6 @@ QSize QWidgetAdapter::minimumSize() const
QSize QWidgetAdapter::maximumSize() const
{
if (m_isWrapper) {
const auto children = childItems();
if (!children.isEmpty()) {
@@ -305,6 +304,21 @@ QRect QWidgetAdapter::normalGeometry() const
return QWidgetAdapter::geometry();
}
void QWidgetAdapter::setNormalGeometry(QRect geo)
{
if (!isTopLevel())
return;
if (QWindow *w = windowHandle()) {
if (isNormalWindowState(w->windowStates())) {
w->setGeometry(geo);
} else {
// Nothing better at this point, as QWindow doesn't have this concept
qDebug() << Q_FUNC_INFO << "TODO";
}
}
}
QRect QWidgetAdapter::rect() const
{
return QRectF(0, 0, width(), height()).toRect();

View File

@@ -123,6 +123,7 @@ public:
QRect frameGeometry() const;
QRect geometry() const;
QRect normalGeometry() const;
void setNormalGeometry(QRect);
QRect rect() const;
QPoint pos() const;
void show();