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 }
|
||||
|
||||
function changeServiceItem(index) {
|
||||
const item = ServiceItemModel.getItem(index);
|
||||
console.log("change-service-item: " + index);
|
||||
const item = ServiceItemC.getRust(index, ServiceItemModel);
|
||||
currentServiceItem = index;
|
||||
const slideId = SlideModel.findSlideIdFromServItm(index);
|
||||
currentSlide = slideId;
|
||||
|
@ -198,7 +199,7 @@ Controls.Page {
|
|||
/* SlideMod.activate(index); */
|
||||
presentation.textIndex = 0;
|
||||
console.log("Slide changed to: ", item.imageBackground);
|
||||
activeServiceItem = ServiceItemModel.getItem(currentServiceItem).name;
|
||||
activeServiceItem = ServiceItemC.getRust(currentServiceItem, ServiceItemModel).name;
|
||||
}
|
||||
|
||||
function loopVideo() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue