[Interest] QML Text.Fit question

Harri Pasanen harri at mpaja.com
Wed Jan 28 09:31:41 CET 2015


If in QML Text item I use Text.Fit size, like

Text {
     id: st
     anchors.centerIn. parent
     width:  200
     height: 100
     fontSizeMode: Text.Fit
     minimumPointSize: 6
     font.pointSize: 120
     text: "Size me if you can!"
}


That works ok.   But I did not find a way to query the size it arrived 
at?  If I do console.log(st.font.pointSize) it is still 120 after the 
real size used is obviously not that after display.

Is there a way to get the size used without dropping to C++?

Thanks,

Harri




More information about the Interest mailing list