[Interest] QML: What is a proper way to bind Label's font to FontMetrics's one

Frank Mertens frank at cyblogic.de
Fri Jun 16 11:44:56 CEST 2023


Hi Alexander,

just in case, check out anchors.baseline.
(That is what designers usually want!-)

Best regards,
Frank.

On 6/16/23 10:19, Alexander Dyagilev wrote:
> Hello,
> 
> Qt 5.12.12 - works fine.
> 
> Qt 6.4.2 - works buggy (IMO).
> 
> Is it just a Qt bug, or is it me know QML not very good?
> 
> So, I'm trying to bind |font| properties in this way:
> 
> Label {
>        id: root
>        FontMetrics {
>           font: root.font
>        }
> }
> 
> Is it legal? If no, is there one? Or, at least, a workaround maybe?  :)
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list