Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/UserList.qml
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 48 | name: { | |||
---|---|---|---|---|---|
71 | return displayName | 71 | return displayName | ||
72 | } | 72 | } | ||
73 | 73 | | |||
74 | userName: model.name | 74 | userName: model.name | ||
75 | 75 | | |||
76 | width: userItemWidth | 76 | width: userItemWidth | ||
77 | height: userItemHeight | 77 | height: userItemHeight | ||
78 | 78 | | |||
79 | //if we only have one delegate, we don't need to clip the text as it won't be overlapping with anything | ||||
80 | constrainText: ListView.view.contentWidth > userItemWidth | ||||
broulik: Just out of curiosity: why not `count`? | |||||
81 | | ||||
82 | Component.onCompleted: { | ||||
83 | console.log("DAVE", ListView.view.children) | ||||
broulik: :D | |||||
Fricking arc. I definitely didn't stage that hunk. Then it kindly goes and adds them back thinking you've accidentally missed them. davidedmundson: Fricking arc. I definitely didn't stage that hunk. Then it kindly goes and adds them back… | |||||
84 | } | ||||
85 | | ||||
79 | isCurrent: ListView.isCurrentItem | 86 | isCurrent: ListView.isCurrentItem | ||
80 | 87 | | |||
81 | onClicked: { | 88 | onClicked: { | ||
82 | ListView.view.currentIndex = index; | 89 | ListView.view.currentIndex = index; | ||
83 | ListView.view.userSelected(); | 90 | ListView.view.userSelected(); | ||
84 | } | 91 | } | ||
85 | } | 92 | } | ||
86 | 93 | | |||
87 | Keys.onEscapePressed: view.userSelected() | 94 | Keys.onEscapePressed: view.userSelected() | ||
88 | Keys.onEnterPressed: view.userSelected() | 95 | Keys.onEnterPressed: view.userSelected() | ||
89 | Keys.onReturnPressed: view.userSelected() | 96 | Keys.onReturnPressed: view.userSelected() | ||
90 | } | 97 | } |
Just out of curiosity: why not count?