Qt for uwp Set size
Unsolved
QML and Qt Quick
-
I created simple project QtQuick and want to set minimum size of window. When i build and run it like desktop application all works right. But for UWP it ignore my sizing parametrs. How to fix it?
import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Window 2.13 ApplicationWindow { id: mainWindow visible: true title: qsTr("Hello World") height: 700 width: 700 minimumWidth: 700 Rectangle { id: rectangle x: 50 y: 50 width: 542 height: 200 color: "#d81f1f" border.color: "#ea7777" } }
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }