Hi Alex
It might be possible to get the legend size by calling the method
QgsComposerLegend::paintAndDetermineSize with a 0 pointer as argument to
get the size:
/**Paints the legend and calculates its size. If painter is 0, only size
is calculated*/
QSizeF paintAndDetermineSize( QPainter* painter );
Regards,
Marco
On 27.02.2012 18:50, Alexander Bruy wrote:
Hi again,
seems it is impossible to get real width and height of the legend
until composition is not rendered. When legend added to composition
it always reports width == 4.0 and some height (different for different
layersets). And only after rendering composition I can get real legend
width and height.
Maybe there is some trick to get this info without rendering composition?
Thanks
--
Dr. Marco Hugentobler
Sourcepole - Linux& Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
[email protected] http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer