Search code examples
windowqt5window-resizeqtquick2

How to make QtQuick2.0 application window not resizable?


I have a QtQuick2.0/QtQuick2.1 application with following default codes on main.cpp:

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/WikiTransferor2/mainMode3.qml"));
    viewer.showExpanded();
    return app.exec();
}

How can i make this window not resizable?


Solution

  • Like all QWindow : using flags or with setting min and max size with same value