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. MapboxGL plugin built on MSVC2019 incompatible with Qt Quick
Qt 6.11 is out! See what's new in the release blog

MapboxGL plugin built on MSVC2019 incompatible with Qt Quick

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 678 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    MyLV
    wrote on last edited by
    #1

    Hello,
    I built Mapbox GL Native on MSCV 2019 successfully based on @dpaulat implementation.
    https://github.com/mapbox/mapbox-gl-native/pull/16611
    and, generated mapboxgl plugin for Qt5.15.2
    I tested on a very simple project, the map can be loaded but the text ''R E C T" inside the rectangle is invisible. (If I put text into "Item", the text is visible)

    7196df45-c118-46fb-80e2-32977f114e4a-image.png

    • MapboxGL dll file : https://github.com/MyLV1701/MapboxGL_Dll/tree/main/MapboxGL_VS2019_Qt5152_maplibre-gl-native

    • main.qml:

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    import QtLocation 5.15
    import QtPositioning 5.15
    import QtQuick.Layouts 1.15

    ApplicationWindow {

    width: 800
    height: 600
    visible: true
    

    Rectangle{
    id: rectId
    width: 400
    height: 100
    color: "yellow"

        Text {
            id: textInsideRect
            anchors.centerIn: parent
            text: qsTr("R E C T")
            font.pixelSize: 20
            color: "red"
        }
    }
    
    
    Item {
        id: itemId
        x: 400
        width: 400
        height: 100
    
        Text {
            id: txtItem
            text: qsTr("I T E M")
            anchors.centerIn: parent
            font.pixelSize: 20
            color: "red"
        }
    }
    
    
    Map {
        id: map
        y: 100
    
        width: 800
        height: 500
    
        plugin: Plugin {
            name: "mapboxgl"
    
            PluginParameter {
                name: "mapboxgl.access_token";
                value: "pk.eyJ1IjoidGFudHJpZG8iLCJhIjoiY2tlYnB0YWo0MGFpczJzcnZubHRlNTAwbiJ9.6QG-4BeuCpUjaawDiyyfVg"
            }
    
            PluginParameter {
                name: "mapboxgl.mapping.additional_style_urls";
                value: "mapbox://styles/tantrido/ckyuch3ub001q16ofjwsxnlz6"
            }
        }
    }
    

    }

    Does it seem the mapboxgl plugin impact Qt Quick???
    and, also the same issue when I built mapboxGL plugin based on maplibre-gl-native.
    https://bugreports.qt.io/browse/QTBUG-74463
    Is this a good idea for solving this problem?
    Sorry for my bad English :(

    M 1 Reply Last reply
    0
    • M MyLV

      Hello,
      I built Mapbox GL Native on MSCV 2019 successfully based on @dpaulat implementation.
      https://github.com/mapbox/mapbox-gl-native/pull/16611
      and, generated mapboxgl plugin for Qt5.15.2
      I tested on a very simple project, the map can be loaded but the text ''R E C T" inside the rectangle is invisible. (If I put text into "Item", the text is visible)

      7196df45-c118-46fb-80e2-32977f114e4a-image.png

      • MapboxGL dll file : https://github.com/MyLV1701/MapboxGL_Dll/tree/main/MapboxGL_VS2019_Qt5152_maplibre-gl-native

      • main.qml:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtLocation 5.15
      import QtPositioning 5.15
      import QtQuick.Layouts 1.15

      ApplicationWindow {

      width: 800
      height: 600
      visible: true
      

      Rectangle{
      id: rectId
      width: 400
      height: 100
      color: "yellow"

          Text {
              id: textInsideRect
              anchors.centerIn: parent
              text: qsTr("R E C T")
              font.pixelSize: 20
              color: "red"
          }
      }
      
      
      Item {
          id: itemId
          x: 400
          width: 400
          height: 100
      
          Text {
              id: txtItem
              text: qsTr("I T E M")
              anchors.centerIn: parent
              font.pixelSize: 20
              color: "red"
          }
      }
      
      
      Map {
          id: map
          y: 100
      
          width: 800
          height: 500
      
          plugin: Plugin {
              name: "mapboxgl"
      
              PluginParameter {
                  name: "mapboxgl.access_token";
                  value: "pk.eyJ1IjoidGFudHJpZG8iLCJhIjoiY2tlYnB0YWo0MGFpczJzcnZubHRlNTAwbiJ9.6QG-4BeuCpUjaawDiyyfVg"
              }
      
              PluginParameter {
                  name: "mapboxgl.mapping.additional_style_urls";
                  value: "mapbox://styles/tantrido/ckyuch3ub001q16ofjwsxnlz6"
              }
          }
      }
      

      }

      Does it seem the mapboxgl plugin impact Qt Quick???
      and, also the same issue when I built mapboxGL plugin based on maplibre-gl-native.
      https://bugreports.qt.io/browse/QTBUG-74463
      Is this a good idea for solving this problem?
      Sorry for my bad English :(

      M Offline
      M Offline
      MyLV
      wrote on last edited by MyLV
      #2

      Hi all, Just setting "radius" to a very small value can resolve that one. for example radius: height/1000 inside the Rectangle. I still don't know why, can someone explain, please?

      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