Hi john marker,
What you are asking is definitely possible with the ArcGIS Runtime for Qt.
1) Create and render clicks as points
You are going to want to connect to the MapQuickView::mouseClicked(QMouseEvent& mouseEvent) signal which contains the screen coordinates of the mouse click. From there you will want to call MapQuickView::screenToLocation(double x, double y) which returns a Point in the coordinates of the GeoView. Then you can symbolize and add as a graphic to a graphics overlay which will render the clicked point on the map.
2) Create and render polyline from clicked point
You are going to want to use the class PolylineBuilder which is a helper class for building immutable polyline geometries. You will simply call PolylineBuilder::addPoint(Point&) which will connect the previous point to the newly added point creating a new segment. Then you call PolylineBuilder::toPolyline which is used to display and symbolize the polyline.
It will look something like the following:
connect(m_mapView, &MapQuickView::mouseClicked, this, [this](QMouseEvent &mouseEvent)
{
const Point clickedPoint = m_mapView->screenToLocation(mouseEvent.x(), mouseEvent.y());
const Geometry pointGeom = GeometryEngine::normalizeCentralMeridian(clickedPoint);
SimpleMarkerSymbol* pointMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor("red"), 10, this);
m_graphicOverlay->graphics()->append(new Graphic(pointGeom, pointMarkerSymbol));
m_polylineBuilder->addPoint(pointGeom);
const Polyline singleLine = m_polylineBuilder->toPolyline();
SimpleLineSymbol* lineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle::Dash, QColor("blue"), 3, this);
m_graphicOverlay->graphics()->append(new Graphic(singleLine, lineSymbol));
});
Best Regards,
Jared