Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Unexpected bar/line at bottom of TextArea
Forum Updated to NodeBB v4.3 + New Features

Unexpected bar/line at bottom of TextArea

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 352 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    t0m.n
    wrote on last edited by t0m.n
    #1

    Hi all!

    I have a TextArea attached to a ScrollView like this:

    ScrollView {
            id: sv
            anchors.right: parent.right
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.rightMargin: 5
            anchors.topMargin: 5
            anchors.bottomMargin: 300
            width: 250
    
            TextArea {
                id: ta            
                readOnly: true
                width: parent.width
                height: parent.height
                font.pointSize: 8           
                cursorPosition: ta.length
    
                Connections {
                    property int cnt
                    target: esp32Backend
                    onSerDataAvail: {
                        ta.append(esp32Backend.getSerialMessage());
                        cnt++
                        if (cnt == 250) {
                            cnt = 0;
                            ta.clear();
                        }
                    }
                }
            }
        }
    

    The purpose is to have a little scrollable serial console that just appends every message it receives at the end of the TextArea.

    Once the application is started there is a big grey bar at the bottom of the TextArea:

    0_1563951455533_2019-07-24_08h48_04.png

    Once I click in the TextArea the bar changes into a thin line:

    0_1563951489320_2019-07-24_08h48_12.png

    Where does this bar and line come from and any ideas on how to get rid of them?

    Material Theme Light and accent Red is applied.
    QT 5.12.4 / Windows 10

    Thanks!

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      Probably it is an background property of TextArea, but I cannot reproduce behavior such as at 1st screenshot, using Qt 5.12.3. If you want to get rid of it, you can set background: null (or any another component as you wish) property for your TextArea.

      1 Reply Last reply
      1
      • T Offline
        T Offline
        t0m.n
        wrote on last edited by
        #3

        Setting

        background: null
        

        indeed did the trick for both the bar and the line!
        Thank you very much!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved