Qt World Summit: Submit your Presentation

QML Harmattan MainPage ToolBar Height

  • 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!

  • 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

  • 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!

Log in to reply