[Qgis-developer] Symbol properties dialog from plugin

Andreas Neumann a.neumann at carto.net
Thu Dec 22 04:13:54 EST 2011


 Hi Denis,

 The QgsRubberband was never meant as a full-featured rendering of 
 features. It was made to highlight features (e.g. selected features) or 
 to quickly draw an overlay.

 If you want full-featured rendering you can create a separate layer, or 
 a temporary MemoryLayer.

 Andreas

 On Thu, 22 Dec 2011 07:50:11 +0100, Denis Rouzaud wrote:
> Thanks Marco, that worked!
>
>  I first create a symbol using
>  self.symbol = QgsLineSymbolV2()
>  And then I can edit it using
>  QgsSymbolV2PropertiesDialog(self.symbol,self.layer).exec_()
>
>  There is only one concern, the rubber band does not accept a full
> symbol, only a width and a color. Is there a reason for that?
>
>  BTW, I just applied to this list, and I don't really know how to
> answer emails as I checked the daily digest option. Does anyone has a
> tip?
>
>  Thanks again,
>  Greetings,
>  Denis
>
>> Hi Denis
>>
>> You can use the class QgsSymbolV2PropertiesDialog and pass existing
>> symbol and vector layer in constructor. Afaik the symbol will be
>> changed
>> directly, however it is possible to make a backup with clone().
>>
>> Regards,
>> Marco

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Qgis-developer mailing list