Solved text and TextField
-
how can i anchor item just after text in text field. even though text field is big and text is small how can i detect end of the text?
-
@AYYAPPA hi,
See http://doc.qt.io/qt-5/qml-qtquick-textmetrics.htmlexemple :
TextField { height: 60 width: 400 id: tx text: "testText" anchors.centerIn: parent } property int margin:20 Button{ width: 80 height: 40 anchors.verticalCenter: tx.verticalCenter anchors.left: tx.right anchors.leftMargin: -((tx.width - margin) - t_m.tightBoundingRect.width) } TextMetrics { id:t_m font:tx.font text:tx.text }
LA
-
@LeLev thanks mate ! exactly what i needed!
-
@AYYAPPA nice!