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. advise in setting the size (width and height) of the item container
Forum Updated to NodeBB v4.3 + New Features

advise in setting the size (width and height) of the item container

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 333 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.
  • L Offline
    L Offline
    literA2
    wrote on last edited by literA2
    #1

    Hi experts,

    I would like to know the better way in setting the size of the container or pages so that it would be smooth when changing orientation.

    In my main file, i have a StackView where new pages will be push, when needed and pop to hide from the screen. My problem is, when changing orientation, the width and height of the SatckViewdelegate were not smoothly filling up the entire page. For example when changing from Portrait to Landscape, at some point the page width will remain for millisecond before adjusting to the new width of the screen. This is visible because I have a white background color and you can see the black screen prior adjusting the width to fill the screen. This same goes when changing orientation from Landscape to Portrait.

    I have tried adding properties when pushing new item on the Stack.

    push({item: Qt.resolveUrl("NewPage.qml"), properties: {width: stackView.width, height: stackview.height}});
    

    Without adding such properties when pushing new item on Stack, it works perfectly for iOS, it is smoothly adjusting it's width and height when changing orientation.

    This issue is only visible in Android.

    When i tried displaying a Rectangle only as a test, it works perfectly when changing orientation. The width and height smoothly adjusting or filling the entire screen when rotating the screen.

    Please advise. Thanks.

    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