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. QML generic multi-page template ?

QML generic multi-page template ?

Scheduled Pinned Locked Moved QML and Qt Quick
qmltemplateqqmlcontext
2 Posts 2 Posters 1.6k Views
  • 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.
  • C Offline
    C Offline
    clogwog
    wrote on 13 Jul 2015, 10:28 last edited by
    #1

    I am trying to write an QML application that can run on different screen sizes (iphone, desktop, android, iPad, etc..) and has multiple pages.

    • are there any 'templates' out there that auto-resize to the different screen sizes ? or do i need to pass them in using a QQmlContext in c++ ?

    • how is this normally done ?

    i've setup something that uses a StackView to load pages on demand, but am running into problems that the page sizes don't seem to match the main page unless i hard code the width, height and sometimes ever need to specify a hard coded x location for images.

    P 1 Reply Last reply 13 Jul 2015, 10:52
    0
    • C clogwog
      13 Jul 2015, 10:28

      I am trying to write an QML application that can run on different screen sizes (iphone, desktop, android, iPad, etc..) and has multiple pages.

      • are there any 'templates' out there that auto-resize to the different screen sizes ? or do i need to pass them in using a QQmlContext in c++ ?

      • how is this normally done ?

      i've setup something that uses a StackView to load pages on demand, but am running into problems that the page sizes don't seem to match the main page unless i hard code the width, height and sometimes ever need to specify a hard coded x location for images.

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 13 Jul 2015, 10:52 last edited by
      #2

      Hi @clogwog
      Use Screen to get the Screen's deimesions. Bind the width and height of root element to it.

      157

      1 Reply Last reply
      0

      1/2

      13 Jul 2015, 10:28

      • Login

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