Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52030

latitude starts at 0 for Maps in Layouts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0 Alpha
    • None
    • Qt 5.7 from git
      import QtQuick 2.6
      import QtQuick.Controls 1.5
      import QtQuick.Layouts 1.3
      import QtLocation 5.6

    Description

      It seems latitude of Map is not properly initialized when used in a Layout.

      Example:

          ColumnLayout {
              anchors.fill: parent
      
              Map {
                  plugin: Plugin { name: "osm" }
      
                  Layout.fillHeight: true
                  Layout.fillWidth: true
      
                  center {
                      latitude: 70
                      longitude: 9
                  }
      
                  zoomLevel: 3
              }
          }
      

      quick fix for this minimal example is to add a fake size to the Map item which will be overridden by Layout later on. But to my understanding this may interfere with the Layout itself in more complex layout scenarios

      width: 1; height: 1

      Attachments

        For Gerrit Dashboard: QTBUG-52030
        # Subject Branch Project Status CR V

        Activity

          People

            paangele Paolo Angelelli
            alexander_lanin Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes