<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div>Hi,<br>
      I'm Simone Melis and I'm sw engineer in an Italian company.<br>
      <br>
    </div>
    <div>I' m using QGis API 3.26 on Ubuntu 20.04, to create an
      application GUI using Qt 5.15.2</div>
    <div><br>
    </div>
    <div>I created a vector layer and I can show correctly a
      georeferenced pdf image. </div>
    <div>Then I added another transparent layer  (vector layer) and I
      tried to add markers in lat,long points.</div>
    <div>Using <span style="color:rgb(128,0,128)">QgsSimpleMarkerSymbolLayer
      </span>I can inserted correctly all markers of the same shape and
      color. Then I tried to add markers with different shapes and
      colors on the same layers; using <span
        style="color:rgb(128,0,128)">QgsSimpleMarkerSymbolLayer </span>I
      show only one kind of marker. Browsing on internet I found an
      example to use <span style="color:rgb(128,0,128)">QgsCategorizedSymbolRenderer</span>.
      I tried to implement it in my code but no markers shown. Can you
      suggest a correct way to do this?</div>
    <div><br>
    </div>
    <div>Thanks,</div>
    <div><br>
    </div>
    <div>Simone<br>
    </div>
    <div><br>
    </div>
    <div>Here code I implemented:</div>
    <div><br>
    </div>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(128,128,0)">    double</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">latitude</span>[<span
    style="color:rgb(0,0,128)">4</span>]<span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span>{<span
    style="color:rgb(0,0,128)">44.095003</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">44.095103</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">44.095203</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">44.094811</span>};</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,128,0)">double</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">longitude</span>[<span
    style="color:rgb(0,0,128)">4</span>]<span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span>{<span
    style="color:rgb(0,0,128)">9.858660</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">9.859060</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">9.859460</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">9.859034</span>};</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">QgsCategorizedSymbolRenderer</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,0)">transparentLayerBSPRX</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">dataProvider</span>()-><span
    style="font-style:italic;color:rgb(0,103,124)">addAttributes</span>({<span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(0,128,0)">"Category"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">String</span>),</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">                                                          </span><span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(0,128,0)">"Name"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">String</span>),</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">                                                          </span><span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(0,128,0)">"Latitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">Double</span>),</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">                                                          </span><span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(0,128,0)">"Longitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">Double</span>),</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">                                                          </span><span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(0,128,0)">"Type"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">String</span>)});</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Set</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">up</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">the</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">default</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">symbol</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QgsSimpleMarkerSymbolLayer</span>*<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">BSPRX_SymbolLayer</span><span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,128,0)">new</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QgsSimpleMarkerSymbolLayer</span>();</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">BSPRX_SymbolLayer</span>-><span
    style="color:rgb(0,103,124)">setShape</span>(<span
    style="color:rgb(128,0,128)">QgsSimpleMarkerSymbolLayer</span>::<span
    style="color:rgb(128,0,128)">Circle</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">BSPRX_SymbolLayer</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">setSize</span>(<span
    style="color:rgb(0,0,128)">5.0</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">BSPRX_SymbolLayer</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">setColor</span>(<span
    style="color:rgb(128,0,128)">Qt</span>::<span
    style="color:rgb(128,0,128)">blue</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QgsSymbol</span>*<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">def_symbol</span><span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QgsSymbol</span>::<span
    style="color:rgb(0,103,124)">defaultSymbol</span>(<span
    style="color:rgb(128,0,128)">QgsWkbTypes</span>::<span
    style="color:rgb(128,0,128)">PointGeometry</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">def_symbol</span>-><span
    style="color:rgb(0,103,124)">changeSymbolLayer</span>(<span
    style="color:rgb(0,0,128)">0</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="font-style:italic;color:rgb(9,46,100)">BSPRX_SymbolLayer</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,128,0)">for</span><span
    style="color:rgb(192,192,192)"> </span>(<span
    style="color:rgb(128,128,0)">int</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">i</span><span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">0</span>;<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">i</span><span
    style="color:rgb(192,192,192)"> </span><<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,0,128)">4</span>;<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">i</span>++)<span
    style="color:rgb(192,192,192)">  </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Corrected</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">loop</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">condition</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span>{</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(128,0,128)">QgsFeature</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">feature</span>(<span
    style="color:rgb(128,0,0)">transparentLayerBSPRX</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">dataProvider</span>()-><span
    style="font-style:italic;color:rgb(0,103,124)">fields</span>());</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(128,128,0)">if</span><span
    style="color:rgb(192,192,192)"> </span>(<span
    style="color:rgb(9,46,100)">i</span><<span
    style="color:rgb(0,0,128)">1</span>)</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span>{</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Create</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">a</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">new</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">feature</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Category"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"A"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Name"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"RX"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Latitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">latitude</span>[<span
    style="color:rgb(9,46,100)">i</span>]);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Longitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">longitude</span>[<span
    style="color:rgb(9,46,100)">i</span>]);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Type"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"BSPRX"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">def_symbol</span>-><span
    style="color:rgb(0,103,124)">symbolLayers</span>()<span
    style="color:rgb(0,103,124)">[</span><span
    style="color:rgb(0,0,128)">0</span><span
    style="color:rgb(0,103,124)">]</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">setColor</span>(<span
    style="color:rgb(128,0,128)">Qt</span>::<span
    style="color:rgb(128,0,128)">red</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span>}</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(128,128,0)">else</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span>{</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Create</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">a</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">new</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">feature</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Category"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"B"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Name"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"TX"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Latitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">latitude</span>[<span
    style="color:rgb(9,46,100)">i</span>]);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Longitude"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">longitude</span>[<span
    style="color:rgb(9,46,100)">i</span>]);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">setAttribute</span>(<span
    style="color:rgb(0,128,0)">"Type"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"BSPTX"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">            </span><span
    style="color:rgb(9,46,100)">def_symbol</span>-><span
    style="color:rgb(0,103,124)">symbolLayers</span>()<span
    style="color:rgb(0,103,124)">[</span><span
    style="color:rgb(0,0,128)">0</span><span
    style="color:rgb(0,103,124)">]</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">setColor</span>(<span
    style="color:rgb(128,0,128)">Qt</span>::<span
    style="color:rgb(128,0,128)">blue</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span>}</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Add</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">the</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">feature</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">to</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">the</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">layer</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(128,0,0)">transparentLayerBSPRX</span>-><span
    style="font-style:italic;color:rgb(0,103,124)">dataProvider</span>()-><span
    style="font-style:italic;color:rgb(0,103,124)">addFeatures</span>(<span
    style="color:rgb(128,0,128)">QgsFeatureList</span><span
    style="font-style:italic">()</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="font-style:italic;color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="font-style:italic;color:rgb(9,46,100)">feature</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(128,0,0)">transparentLayerBSPRX</span>-><span
    style="color:rgb(0,103,124)">addAttribute</span>(*<span
    style="color:rgb(128,128,0)">new</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QgsField</span>(<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">color"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QVariant</span>::<span
    style="color:rgb(128,0,128)">String</span>));</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(0,0,128)">qDebug</span>()<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"Feature</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Attributes:"</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">feature</span>.<span
    style="color:rgb(0,103,124)">attributes</span>();</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span>}</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QgsCategorizedSymbolRenderer</span>*<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">categorizedRenderer</span><span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,128,0)">new</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QgsCategorizedSymbolRenderer</span>(<span
    style="color:rgb(0,128,0)">"Category"</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QgsRendererCategory</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">bsprxCategory</span>(<span
    style="color:rgb(0,128,0)">"A"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="font-style:italic;color:rgb(9,46,100)">def_symbol</span><span
    style="font-style:italic">-></span><span
    style="font-style:italic;color:rgb(0,103,124)">clone</span><span
    style="font-style:italic">()</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"RX"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,128,0)">true</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">categorizedRenderer</span>-><span
    style="color:rgb(0,103,124)">addCategory</span>(<span
    style="color:rgb(9,46,100)">bsprxCategory</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QgsRendererCategory</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">bsptxCategory</span>(<span
    style="color:rgb(0,128,0)">"B"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="font-style:italic;color:rgb(9,46,100)">def_symbol</span><span
    style="font-style:italic">-></span><span
    style="font-style:italic;color:rgb(0,103,124)">clone</span><span
    style="font-style:italic">()</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"TX"</span>,<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,128,0)">true</span>);</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(9,46,100)">categorizedRenderer</span>-><span
    style="color:rgb(0,103,124)">addCategory</span>(<span
    style="color:rgb(9,46,100)">bsptxCategory</span>);</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Print</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">symbols</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">for</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">debugging</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,128)">QList</span><<span
    style="color:rgb(128,0,128)">QgsRendererCategory</span>><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">categories</span><span
    style="color:rgb(192,192,192)"> </span>=<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">categorizedRenderer</span>-><span
    style="color:rgb(0,103,124)">categories</span>();</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,128,0)">for</span><span
    style="color:rgb(192,192,192)"> </span>(<span
    style="color:rgb(128,128,0)">const</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(128,0,128)">QgsRendererCategory</span>&<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">category</span><span
    style="color:rgb(192,192,192)"> </span>:<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">categories</span>)</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span>{</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">        </span><span
    style="color:rgb(0,0,128)">qDebug</span>()<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"Category:"</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">category</span>.<span
    style="color:rgb(0,103,124)">label</span>()<span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">"Symbol:"</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,103,124)"><<</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(9,46,100)">category</span>.<span
    style="color:rgb(0,103,124)">symbol</span>()-><span
    style="color:rgb(0,103,124)">color</span>();</pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span>}</pre>
    <pre style="margin:0px;text-indent:0px"></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(0,128,0)">//</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">Apply</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">the</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">renderer</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">to</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">the</span><span
    style="color:rgb(192,192,192)"> </span><span
    style="color:rgb(0,128,0)">layer</span></pre>
    <pre style="margin:0px;text-indent:0px"><span
    style="color:rgb(192,192,192)">    </span><span
    style="color:rgb(128,0,0)">transparentLayerBSPRX</span>-><span
    style="color:rgb(0,103,124)">setRenderer</span>(<span
    style="font-style:italic;color:rgb(9,46,100)">categorizedRenderer</span>);


</pre>
    <div class="moz-signature">-- <br>
      <img src="cid:part1.Ef0OHtyn.mmwRmjbC@leonardo-si.it" border="0"></div>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /><table style="border-top: 1px solid #D3D4DE;"><tr><td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"/></a></td><td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Privo di virus.<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a></td></tr></table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>