<div dir="ltr"><div>Hi Martin,<br><br>Thanks for the help. Now I can display the widget in my scrollArea. I have still have some crashes, but this is the way to go. I will then need to set the layer style via a custom "apply" button<br><br></div>Cheers,<br>Michael<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 17:23 GMT+02:00 Martin Dobias <span dir="ltr"><<a href="mailto:wonder.sk@gmail.com" target="_blank">wonder.sk@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michael<br>
<br>
The QgsRendererV2Widget is really just abstract base class meant to be<br>
implemented by custom implementations of renderers.<br>
<br>
I think you are looking for this:<br>
<br>
from qgis.gui import *<br>
w=QgsRendererV2PropertiesDialog(iface.activeLayer(),<br>
QgsStyleV2.defaultStyle(), True)<br>
w.show()<br>
<br>
Cheers<br>
Martin<br>
<div><div class="h5"><br>
<br>
On Tue, Jun 23, 2015 at 11:09 PM, kimaidou <<a href="mailto:kimaidou@gmail.com">kimaidou@gmail.com</a>> wrote:<br>
> Ok, it seems python bindings are missing here. Here is the console output<br>
><br>
>>>> from qgis.gui import *<br>
>>>> from qgis.core import *<br>
>>>> rw = QgsRendererV2Widget( iface.activeLayer(), QgsStyleV2.defaultStyle()<br>
>>>> )<br>
> Traceback (most recent call last):<br>
>   File "<input>", line 1, in <module><br>
> TypeError: qgis._gui.QgsRendererV2Widget represents a C++ abstract class and<br>
> cannot be instantiated<br>
><br>
> Too bad ;)<br>
><br>
><br>
><br>
> 2015-06-23 16:38 GMT+02:00 kimaidou <<a href="mailto:kimaidou@gmail.com">kimaidou@gmail.com</a>>:<br>
>><br>
>> Hum...<br>
>> After digging a little deeper, I found something interesting in the Python<br>
>> Cookbook [1]<br>
>> It seems I need to use the class QgsRendererV2Widget<br>
>><br>
>> [1]<br>
>> <a href="http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#creating-custom-renderers" rel="noreferrer" target="_blank">http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#creating-custom-renderers</a><br>
>><br>
>> 2015-06-23 16:29 GMT+02:00 kimaidou <<a href="mailto:kimaidou@gmail.com">kimaidou@gmail.com</a>>:<br>
>>><br>
>>> Hi all,<br>
>>><br>
>>> The LayerBoard plugin I made during the HF in "Nooooooooodebo" shows a<br>
>>> table of all vector (and raster) layers and allows to edit some properties<br>
>>> directly by editing the table cells, such as max and min scale, layer name,<br>
>>> title and abstract, assign SRS, etc.<br>
>>><br>
>>> I would like to display the content of the Style tab of the layer<br>
>>> properties dialog in a panel right to the table. This tab will show the<br>
>>> style interface refreshed whenever the user clicks on a layer in the tab,<br>
>>> and let her/him change the style for this layer the same way we do via the<br>
>>> layer properties dialog.<br>
>>><br>
>>> I have searched a bit in the api and in the source code, but cannot find<br>
>>> the right way to do so. I have not found a custom Widget which I can<br>
>>> instantiate with the layer and wich will provide me all the logic<br>
>>> underneath.<br>
>>><br>
>>> Is this even possible ? Has anyone an idea of how to to this without<br>
>>> rewriting all the code ( connection between ui elements and slots)<br>
>>><br>
>>> Thanks in advance<br>
>>><br>
>>> Michaël<br>
>><br>
>><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div>