<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to delete Graphics in QML in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056126#M4113</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I try to delete Graphics in QML.&lt;/P&gt;&lt;P&gt;My code is&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;onMouseClicked: {
    clickPointBuilder.points.addPoint(cPoint)
    wayPointMakeGraphic.geometry = clickPointBuilder.geometry
    clickPointLineBuilder.addPoint(cPoint)
    wayPointLineMakeGraphic.geometry = clickPointLineBuilder.geometry
}

Item{
    focus: true
    if(event.key === Qt.Key_C){
        console.log("OK CLEAR")
        clickPointBuilder.points.removeAll()
        clickPointLineBuilder.parts.removeAll()
    }
}&lt;/LI-CODE&gt;&lt;P&gt;But, This code have a flaw.&lt;/P&gt;&lt;P&gt;I want to delete it&amp;nbsp; when I press the C Key.&lt;/P&gt;&lt;P&gt;It will be deleted when I click the screen again after pressing the C key.&lt;/P&gt;&lt;P&gt;How to delete Graphics?&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 06:50:53 GMT</pubDate>
    <dc:creator>KanjaSousuke</dc:creator>
    <dc:date>2021-05-10T06:50:53Z</dc:date>
    <item>
      <title>How to delete Graphics in QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056126#M4113</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I try to delete Graphics in QML.&lt;/P&gt;&lt;P&gt;My code is&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;onMouseClicked: {
    clickPointBuilder.points.addPoint(cPoint)
    wayPointMakeGraphic.geometry = clickPointBuilder.geometry
    clickPointLineBuilder.addPoint(cPoint)
    wayPointLineMakeGraphic.geometry = clickPointLineBuilder.geometry
}

Item{
    focus: true
    if(event.key === Qt.Key_C){
        console.log("OK CLEAR")
        clickPointBuilder.points.removeAll()
        clickPointLineBuilder.parts.removeAll()
    }
}&lt;/LI-CODE&gt;&lt;P&gt;But, This code have a flaw.&lt;/P&gt;&lt;P&gt;I want to delete it&amp;nbsp; when I press the C Key.&lt;/P&gt;&lt;P&gt;It will be deleted when I click the screen again after pressing the C key.&lt;/P&gt;&lt;P&gt;How to delete Graphics?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 06:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056126#M4113</guid>
      <dc:creator>KanjaSousuke</dc:creator>
      <dc:date>2021-05-10T06:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete Graphics in QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056270#M4114</link>
      <description>&lt;P&gt;Simply updating the builder will not update the graphic's geometry. After you removeAll() on the builders, you need to set the geometry on &lt;FONT face="andale mono,times"&gt;wayPointMakeGraphic&lt;/FONT&gt; and &lt;FONT face="andale mono,times"&gt;wayPointLineMakeGraphic&lt;/FONT&gt;&amp;nbsp;from the builders again, as you do in your onMouseClicked method. This should set the geometries on the graphics to valid, but empty geometries.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 16:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056270#M4114</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-05-10T16:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete Graphics in QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056482#M4115</link>
      <description>&lt;P&gt;Thanks.&lt;BR /&gt;I can do it.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 23:10:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-delete-graphics-in-qml/m-p/1056482#M4115</guid>
      <dc:creator>KanjaSousuke</dc:creator>
      <dc:date>2021-05-10T23:10:16Z</dc:date>
    </item>
  </channel>
</rss>

