Unsolved TextArea Limit on the number of symbols
-
Hi!
How I can to do limit on the number of symbols from TextArea with QtQuick.Controls 2?
It is work only to QtQuick.Controls 1 https://doc.qt.io/qt-5/qml-qtquick-controls-textarea.html#contentHeight-prop
I only came up with this option:onTextChanged: { if(textAreaSetTextAddQuestionLeftBottom.length > 400){ console.log(textAreaSetTextAddQuestionLeftBottom.text) textAreaSetTextAddQuestionLeftBottom.text = textAreaSetTextAddQuestionLeftBottom.text.slice(0, 400) }