Solved QQuickView resizing using mouse problem
-
Hi there,
I have problem resizing the window using this example. It works, but unpredictable when it becomes unresponsive. Window minimization and maximization works every time, but resizing with the mouse causes weird behavior. What I do wrong here?
Thanks!#include <QGuiApplication> #include <QQuickView> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQuickView view; view.setSource(QUrl(QStringLiteral("qrc:/main.qml"))); view.show(); return app.exec(); }
And this is the main QML code:
import QtQuick 2.10 Rectangle { anchors.fill: parent color: "yellow" }
-
view.setResizeMode(QQuickView::SizeRootObjectToView);
-
@raven-worx
Thanks, I was expecting that the root element will behave like the other elements so it can be anchored to it's parent (window)
I had to get rid of anchors.fill: parent from the root element otherwise it will cause the window freeze. At least the resizing.