<div dir="ltr">Thanks a lot for your answer.<div><br></div><div>I solved my problem</div><div>P</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 12 lug 2021 alle ore 19:56 Benjamin Jakimow <<a href="mailto:benjamin.jakimow@geo.hu-berlin.de">benjamin.jakimow@geo.hu-berlin.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi Pierluigi,</p>
<p>you need to combine the Flags as binary Or ('|') :</p>
<p><span style="color:rgb(148,85,141)">self</span>.overlayLayer_ComboBox.setFilters(QgsMapLayerProxyModel.PointLayer | QgsMapLayerProxyModel.LineLayer)</p>
<p>/Benjamin</p>
<p id="gmail-m_-8125928471837890550reply-intro">On 2021-07-12 19:51, pierluigi de rosa wrote:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="gmail-m_-8125928471837890550replybody1">
<div dir="ltr">Dear All,
<div> </div>
<div>I'm experiencing some problems with the QgsMapLayerComboBox.</div>
<div>I would like to filter all line and polygon layer.</div>
<div>Here below my code:</div>
<div>
<pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace"><span style="color:rgb(148,85,141)">self</span>.overlayLayer_ComboBox.setFilters(QgsMapLayerProxyModel.PointLayer<span style="color:rgb(204,120,50)">,</span>QgsMapLayerProxyModel.LineLayer)</pre>
<div>But I have and Error. I can add only one layer type. Even the QgsmapLayerProxyModel.<a style="box-sizing:border-box;color:rgb(48,145,209);text-decoration-line:none;outline:0px;font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;font-size:14.4px;white-space:nowrap" title="qgis.core.QgsMapLayerProxyModel.VectorLayer" href="https://qgis.github.io/pyqgis/3.2/core/Map/QgsMapLayerProxyModel.html?highlight=qgsmaplayerproxymodel%20pointlayer#qgis.core.QgsMapLayerProxyModel.VectorLayer" rel="noopener noreferrer" target="_blank"><code style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:10.8px;max-width:100%;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:1px solid rgb(225,228,229);padding:2px 5px;color:rgb(64,64,64);overflow-x:auto;font-weight:bold"><span style="box-sizing:border-box">VectorLayer</span></code></a> is not suitable.</div>
<div>I want to show only line and polygon.</div>
<div>Can anyone help me?</div>
<div>Thank you</div>
<div>Pierluigi</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Ing. Pierluigi De Rosa (PhD in Earth Science)</div>
<div dir="ltr">Contract Professor of Geographic Information System at University of Perugia<br>cel: 349755826<span><span>8</span></span> / fax: 075 7823038<br>skype: pierluigi.derosa</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>QGIS-Developer mailing list<br><a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br></p>
<div id="gmail-m_-8125928471837890550signature">-- <br>
<div style="margin:0px;padding:0px;font-family:monospace">--<br>Benjamin Jakimow, Doctoral Researcher<br>Earth Observation Lab | Geography Department | Humboldt-Universität zu Berlin<br><br>e-mail: <a href="mailto:benjamin.jakimow@geo.hu-berlin.de" target="_blank">benjamin.jakimow@geo.hu-berlin.de</a><br><br>phone:  +49 (0) 30 2093 6894<br>mobile: +49 (0) 157 5656 8477<br>fax:    +49 (0) 30 2093 6848<br>mail:   Unter den Linden 6 | 10099 Berlin | Germany<br>room: 2'222</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Ing. Pierluigi De Rosa (PhD in Earth Science)</div><div dir="ltr">Contract Professor of Geographic Information System at University of Perugia<br>cel: 349755826<span><span dir="ltr">8</span></span> / fax: 075 7823038<br>skype: pierluigi.derosa </div></div></div></div></div></div>