fix ListViewWithLabelsType
This commit is contained in:
parent
0f98fc955f
commit
26ba520022
1 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ ListView {
|
||||||
|
|
||||||
property bool dividerVisible: false
|
property bool dividerVisible: false
|
||||||
|
|
||||||
currentIndex: 0
|
property int selectedIndex: 0
|
||||||
|
|
||||||
width: rootWidth
|
width: rootWidth
|
||||||
height: menuContent.contentItem.height
|
height: menuContent.contentItem.height
|
||||||
|
|
@ -45,7 +45,7 @@ ListView {
|
||||||
rightImageSource: imageSource
|
rightImageSource: imageSource
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
menuContent.currentIndex = index
|
menuContent.selectedIndex = index
|
||||||
menuContent.selectedText = name
|
menuContent.selectedText = name
|
||||||
if (menuContent.clickedFunction && typeof menuContent.clickedFunction === "function") {
|
if (menuContent.clickedFunction && typeof menuContent.clickedFunction === "function") {
|
||||||
menuContent.clickedFunction()
|
menuContent.clickedFunction()
|
||||||
|
|
@ -62,7 +62,7 @@ ListView {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (menuContent.currentIndex === index) {
|
if (menuContent.selectedIndex === index) {
|
||||||
menuContent.selectedText = name
|
menuContent.selectedText = name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue