If targeting an embedded device you know the DPI and can use it to set pixelSize and width/height like so: Text { pixelSize: 24*UI.pt } Rectangle { width: 12*UI.cm; height: 6*UI.cm }
Example: https://github.com/pixelgrease/Qt-logical-units From: Ramakanth Kesireddy <rama.k...@gmail.com> > To: Marc Van Daele <marc.van.dael...@gmail.com> > Cc: Qt Interest <interest@qt-project.org> > Bcc: > Date: Fri, 6 Nov 2020 18:30:15 +0530 > Subject: Re: [Interest] Qt5 font size issue with fontconfig > Nope this didn't help. If setting pointsize appropriately for current > display 141 dpi would help to scale for other displays of different screen > sizes in future? > > Is there any formula to calculate the font size in point size based on dpi > display which would work for all display sizes or just setting point size > would help? > > Best Regards, > Ramakanth >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest