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. Strange stripe in background ItemDelegate.
Forum Updated to NodeBB v4.3 + New Features

Strange stripe in background ItemDelegate.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 502 Views
  • 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
    TheGringerEye
    wrote on 16 Apr 2017, 04:15 last edited by
    #1

    Minimal code:

    import QtQuick 2.5
    import QtQuick.Layouts 1.1
    import QtQuick.Controls 2.1
    import QtQuick.Controls.Material 2.1
    
    ListView {
        anchors.fill: parent
        model: ["Test", "Test1", "Test2" ]
        
        delegate: ItemDelegate {
            width: parent.width
            Text
            {
                text: modelData
            }
        }
    }
    

    alt text

    How to delete strange stripe in center delegate?

    I try to learn English.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheGringerEye
      wrote on 18 Apr 2017, 19:29 last edited by TheGringerEye
      #2

      I found a solution.
      It is bag in background component, to fix it in listView delegate item

      Component.onCompleted: height += (height %2 == 0) ? 0 : 1
      

      profit.
      Bag is active if height is not even.

      I try to learn English.

      1 Reply Last reply
      0

      2/2

      18 Apr 2017, 19:29

      • Login

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