gpt4 book ai didi

qt - QML TextArea 基线

转载 作者:行者123 更新时间:2023-12-01 22:16:38 41 4
gpt4 key购买 nike

如何删除出现在 qml 中文本区域下方的行?有可能吗?因为律动音乐有没有台词的东西!那是什么?如果不是,我应该改用什么其他组件?

提前致谢

TextArea{
id:search
placeholderText: qsTr("Search")
x:7
width: parent.width - 25
onFocusChanged: border.color= "gray"

}

(如 groove 音乐搜索框或电报中没有行,只有占位符文本)

截图:

enter image description here

最佳答案

这看起来像 Material 风格。您可以通过设置 background 来禁用该行为 null:

import QtQuick 2.7
import QtQuick.Controls 2.0

ApplicationWindow {
visible: true
width: 640
height: 480

TextArea {
placeholderText: qsTr("Search")
focus: true
background: null
anchors.centerIn: parent
}
}

关于qt - QML TextArea 基线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44932536/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com