QML TextArea 基线

Sor*_*our 2 qt qml

如何删除 qml 中文本区域下出现的行?有可能吗?因为groove音乐有这样一种没有台词的东西!那是什么?如果不是,我应该使用什么其他组件来代替?

提前致谢

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

        }
Run Code Online (Sandbox Code Playgroud)

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

截屏:

在此输入图像描述

Mit*_*tch 7

这看起来像 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
    }
}
Run Code Online (Sandbox Code Playgroud)