[Qgis-developer] Calculating screen width/height on canvas
Duncan Runnacles
drrunnacles at googlemail.com
Wed Jan 6 01:42:14 PST 2016
Hello All,
I've been trying to work out how to calculate screen width and height on
the canvas such as that used in the vector layer properties dialog under
labels and style (the QgsUnitSelectionWidget) and I'm having some trouble.
I.e. find a way to locate something X millimeters from the edge of the
canvas.
I can't seem to find the classes for these dialogs or the location of the
_ui files to work out how they've done it. Would somebody mind pointing me
in the right direction or giving me a heads up on the approach used (or
both) please?
I see that QPaintDevice has a widthMM() function, but I thought I read
somewhere that this is not platform independent and assume this isn't a
great idea?
Any help you could give would be much appreciated.
Thanks,
Duncan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160106/ca1059c8/attachment.html>
More information about the Qgis-developer
mailing list