using the C++ proxy function to get item from Rust Model
QMAP_QSTRING_QVARIANT doesn't automatically convert to a QVariantMap in QML. So we have to run it through C++ to make things work right.
This commit is contained in:
parent
31aec1ca47
commit
8619902644
2 changed files with 4 additions and 3 deletions
|
@ -146,7 +146,8 @@ Controls.Page {
|
||||||
SlideHelper { id: slideHelper }
|
SlideHelper { id: slideHelper }
|
||||||
|
|
||||||
function changeServiceItem(index) {
|
function changeServiceItem(index) {
|
||||||
const item = ServiceItemModel.getItem(index);
|
console.log("change-service-item: " + index);
|
||||||
|
const item = ServiceItemC.getRust(index, ServiceItemModel);
|
||||||
currentServiceItem = index;
|
currentServiceItem = index;
|
||||||
const slideId = SlideModel.findSlideIdFromServItm(index);
|
const slideId = SlideModel.findSlideIdFromServItm(index);
|
||||||
currentSlide = slideId;
|
currentSlide = slideId;
|
||||||
|
@ -198,7 +199,7 @@ Controls.Page {
|
||||||
/* SlideMod.activate(index); */
|
/* SlideMod.activate(index); */
|
||||||
presentation.textIndex = 0;
|
presentation.textIndex = 0;
|
||||||
console.log("Slide changed to: ", item.imageBackground);
|
console.log("Slide changed to: ", item.imageBackground);
|
||||||
activeServiceItem = ServiceItemModel.getItem(currentServiceItem).name;
|
activeServiceItem = ServiceItemC.getRust(currentServiceItem, ServiceItemModel).name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loopVideo() {
|
function loopVideo() {
|
||||||
|
|
|
@ -68,7 +68,7 @@ Item {
|
||||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||||
anchors.rightMargin: Kirigami.Units.smallSpacing * 2
|
anchors.rightMargin: Kirigami.Units.smallSpacing * 2
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: ServiceItemModel.getItem(serviceItemId).name
|
text: ServiceItemC.getRust(serviceItemId, ServiceItemModel).name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue