QML TextInput的字体超出控件范围

本文连接:https://blog.csdn.net/chyuanrufeng/article/details/54691998
问题描述 :QML TextInput输入内容超过TextInput的大小.net

当输入过多的字符串时,会出现内容超过TextInput的大小,字符串出如今TextInput的控件外面的现象,如图blog

解决方式
ip

 TextInput {
                    anchors.fill: parent
                    id : userInput
                    font.pointSize: 15
                    verticalAlignment: Text.AlignVCenter
                    clip: true //设置此属性
                }
1
2
3
4
5
6
7
效果以下字符串

————————————————
版权声明:本文为CSDN博主「缘如风」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处连接及本声明。
原文连接:https://blog.csdn.net/chyuanrufeng/article/details/54691998cli

相关文章
相关标签/搜索