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. Multiple models in Map (QtLocation)
Forum Updated to NodeBB v4.3 + New Features

Multiple models in Map (QtLocation)

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtlocationmapmodeldelegate
4 Posts 2 Posters 2.1k Views 2 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.
  • A Offline
    A Offline
    Alexander_Lanin
    wrote on last edited by
    #1

    Hi,

    Map supports model and delegate parameters, but how shall I go about with multiple models?
    e.g. one from c++ for my stuff and one for showing flickr images (as in positioning example, but with lon+lat data).
    Additionally I would like flickr to be optional.

    Shall I merge those two into a single model? In qml or use C++ for flickr too instead of XmlListModel? How would I use different delegates?

    Or draw the data without model/delegate helpers? how?

    Thanks,
    Alex

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alexander_Lanin
      wrote on last edited by
      #2

      sorry so stupid... that explains why I found no explanation on how to do this :D

      for reference: model + delegate are not parameters of Map but of MapItemView and one can simply add multiple MapItemViews to one Map.

      CharbyC 1 Reply Last reply
      0
      • CharbyC Offline
        CharbyC Offline
        Charby
        wrote on last edited by
        #3

        You can use several models (or even a repeater) as childs of a Map. Making one model tobe optional can be done directly inside a model.
        If you want more details, you could have a look to the workshop materials in this topic : https://forum.qt.io/topic/63838/qt-qml-workshop-materials

        1 Reply Last reply
        0
        • A Alexander_Lanin

          sorry so stupid... that explains why I found no explanation on how to do this :D

          for reference: model + delegate are not parameters of Map but of MapItemView and one can simply add multiple MapItemViews to one Map.

          CharbyC Offline
          CharbyC Offline
          Charby
          wrote on last edited by
          #4

          @Alexander_Lanin didn't see you already found it before I submit my reply...

          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