Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QML Harmattan MainPage ToolBar Height

    QML and Qt Quick
    2
    3
    2476
    Loading More Posts
    • 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.
    • I
      Iktwo last edited by

      Hi, I want to autorotate an app and I'm using the default files generated by Qt Creator, where the MainPage fills the parent window using @anchors.centerIn: parent@

      the problem is that the ToolBar is visible and if I place content there it doesn't show completely, as I 'm using a Grid to correctly auto arrange my icons I want to fix this behaviour, I tried

      @
      height: mainPage.height-commonTools.height
      width: mainPage.width-commonTools.width
      @

      But it doesn't do what I expected, thanks!

      1 Reply Last reply Reply Quote 0
      • T
        task_struct last edited by

        Hi,

        @ anchors.centerIn: parent@ has higher priority than @height: mainPage.height-commonTools.height
        width: mainPage.width-commonTools.width@

        For MainPage use something like this:
        @
        anchors.top: parent.top
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: commonTools.top
        @

        "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

        • Linu...
        1 Reply Last reply Reply Quote 0
        • I
          Iktwo last edited by

          Hi thanks for you answer, I changed my code and instead of a grid I use a flow layout and I works as I expected, thank you so much!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post