From eaf03f41037e6f77eb8b8868ec309fb6d37c5592 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 6 Jan 2017 15:47:33 -0200 Subject: [PATCH] [Qt] Added line-dasharray to the example app Showing how to add numbers in an array. --- platform/qt/app/mapwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index bebf527cf..0b453406f 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -125,6 +125,12 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) m_map->setLayoutProperty("route", "line-join", "round"); m_map->setLayoutProperty("route", "line-cap", "round"); + QVariantList lineDashArray; + lineDashArray.append(1); + lineDashArray.append(2); + + m_map->setPaintProperty("route", "line-dasharray", lineDashArray); + // Markers at the beginning and end of the route m_map->addImage("label-arrow", QImage(":label-arrow.svg")); m_map->addImage("label-background", QImage(":label-background.svg"));