Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Creating UI in QML and setting Orientation from backend C++ qt.



  • Hi All,
    I have created the User interface using Qt Quick. And i am showing the from the backend C++ qt code.

    QQmlComponent *component = new QQmlComponent(&engine, "../FrontEnd/main.qml");
    object = component->create();

    Now i want to change the screen orientation from portrait to landscape and vice versa, from
    the backend c++ qt code based on some event.

    Please help in setting qml made screen orientation from qt c++ backend code.

    Thank you,


Log in to reply