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

Define the page size for QtQuick designer



  • Hi,

    how can we set a fixed size for the QtQuick designer? The problem is that we use properties to determine the page size for the real application like:

    @width: mwSystem.width
    height: mwSystem.height@

    If we start the designer for this page the page size is 0x0 and the designer isn't usable for this page.
    Another question, is there a document which explains how can we deploy QML at different devices?

    Thanks



  • bq. Another question, is there a document which explains how can we deploy QML at different devices?

    "Cross Platform QML":http://alan.imagin-itis.net/?p=416

    Have not read it but it looks promising.

    bq. If we start the designer for this page the page size is 0×0 and the designer isn’t usable for this page.

    You could add a check if the width and height are 0 or not.

    @width: mwSystem.width == 0 ? 1 : mwSystem.width
    height: mwSystem.height == 0 ? 1 : mwSystem.width@



  • Thanks for the link.

    Setting the values like you was also one of our first ideas. But it works not, I think the interpreter stops if the found a complete unknown variable.
    With a property which is set to undefined
    But I have found to fields in the designer at top of the graphical display where I can enter the width and the height for the designer. That will work for us.



  • You're welcome. Have you tried it with null?
    @width: mwSystem.width == null? 1 : mwSystem.width
    height: mwSystem.height == null ? 1 : mwSystem.width@

    Okay, im glad that you found a solution.


Log in to reply