slide_obj.rs working
This commit finally has a working basic slide_obj implemented in Rust! There are likely still some things that need to be tweaked and massaged in order for things to translate back and forth from QML to Rust. The key was to make the old SlideObject written in C++ to act as a bridge between QML and Rust. QML can't seem to understand CXX-QT's QMap_QString_QVariant type as a QVariantMap and thus didn't translate the Javascript object properly. Having the call first go into a C++ class translated it and then was trivial to pass into Rust.
This commit is contained in:
parent
0936490bee
commit
0caadfc5c8
6 changed files with 55 additions and 17 deletions
|
@ -60,6 +60,12 @@ bool SlideObject::loop() const
|
|||
return m_loop;
|
||||
}
|
||||
|
||||
void SlideObject::chngSlide(QVariantMap item, int index, SlideObj *slideObj) {
|
||||
qDebug() << "Here is the pointer to the slideObj" << slideObj;
|
||||
qDebug() << "Here is the item" << item;
|
||||
slideObj->changeSlide(item, index);
|
||||
}
|
||||
|
||||
void SlideObject::changeSlide(QVariantMap item, int index)
|
||||
{
|
||||
// QVariantMap serviceItem = serviceItemModel->getItem(item.value("serviceItemId").toInt());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue