2017-07-05 66 views
0

我該如何刪除qml文本區域下出現的行?它甚至有可能嗎?因爲溝音樂沒有這樣的東西!那是什麼? 如果不是我應該使用什麼其他組件?QML TextArea baseline

在此先感謝

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

     } 

(如在沒有線,只有一個佔位符文凹槽音樂搜索框或電報)

截圖:

enter image description here

+0

什麼Qt的版本?什麼OS?什麼行?我在'TextArea'中沒有行。 – folibis

+0

5.9 - windows - 無法上傳圖片來向你展示我的意思 – Someone

+0

如果你不能直接上傳它,請將它上傳到另一個地方並分享鏈接 – eyllanesc

回答

0

那看起來像材料樣式。您可以禁用通過設置backgroundnull行:

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 
    } 
} 
+0

它的工作 - 謝謝 – Someone