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.

Strange stripe in background ItemDelegate.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 560 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 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 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

      • Login

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