Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Define the page size for QtQuick designer

Define the page size for QtQuick designer

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kortus
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      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@

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kortus
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          onek24
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved