Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 147

QML ListView that fits the chosen style

$
0
0

I want to create a simple GUI, and I need to display a selectable list with multiple rows in each entry. I'm using Material as the main style, but it doesn't look like Material. Is there a way to connect the delegates to Material Design or dynamically when I change to another style like Universal?

         Component {             id: contactDelegate             Item {                 width: 180; height: 40                 Column {                     Text { text: '<b>Name:</b> '+ name }                     Text { text: '<b>Number:</b> '+ number }                 }                 MouseArea {                     anchors.fill: parent                     onClicked:{                         myList.currentIndex = index                         myList.focus = true                          console.log( style.toLocaleString())                     }                 }             }         }         ListView {             id: myList             anchors.fill: parent             model: ContactModel {}             delegate: contactDelegate             highlight: Rectangle { color: "lightgreen"; radius: 5 }             focus: true             addDisplaced: Transition {                 NumberAnimation { properties: "x,y"; duration: 1000 }             }             clip: true         }```

Viewing all articles
Browse latest Browse all 147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>