added a way to get the item through C++ from the rust model
This commit is contained in:
parent
bc3024434e
commit
e5a7360f0b
3 changed files with 16 additions and 35 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <QImage>
|
||||
|
||||
#include "cxx-qt-gen/slide_model.cxxqt.h"
|
||||
#include "cxx-qt-gen/service_item_model.cxxqt.h"
|
||||
|
||||
ServiceItemModel::ServiceItemModel(QObject *parent)
|
||||
: QAbstractListModel(parent) {
|
||||
|
@ -393,6 +394,11 @@ bool ServiceItemModel::moveUp(int id) {
|
|||
return false;
|
||||
}
|
||||
|
||||
QVariantMap ServiceItemModel::getRust(int index, ServiceItemMod *rustModel) const {
|
||||
QVariantMap item = rustModel->getItem(index);
|
||||
return item;
|
||||
}
|
||||
|
||||
QVariantMap ServiceItemModel::getItem(int index) const {
|
||||
QVariantMap data;
|
||||
const QModelIndex idx = this->index(index,0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue