<div dir="ltr">Hello All,<div><br></div><div>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. </div><div><br></div><div>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?</div><div><br></div><div>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?</div><div><br></div><div>Any help you could give would be much appreciated.</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Duncan</div></div>