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

latitude starts at 0 for Maps in Layouts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important 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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes