add list bridge
This commit is contained in:
parent
5203113e40
commit
738566e043
@ -8,6 +8,7 @@
|
||||
#include "utils/DoricDraggableBridge.h"
|
||||
#include "utils/DoricImageBridge.h"
|
||||
#include "utils/DoricInputBridge.h"
|
||||
#include "utils/DoricListBridge.h"
|
||||
#include "utils/DoricMouseAreaBridge.h"
|
||||
#include "utils/DoricSlideItemBridge.h"
|
||||
#include "utils/DoricSliderBridge.h"
|
||||
@ -35,6 +36,8 @@ DoricDemoBridge::DoricDemoBridge(QQmlApplicationEngine *engine, QObject *parent)
|
||||
context->setContextProperty("sliderBridge", sliderBridge);
|
||||
DoricDraggableBridge *draggableBridge = new DoricDraggableBridge();
|
||||
context->setContextProperty("draggableBridge", draggableBridge);
|
||||
DoricListBridge *listBridge = new DoricListBridge();
|
||||
context->setContextProperty("listBridge", listBridge);
|
||||
}
|
||||
|
||||
void DoricDemoBridge::navigate(QVariant source, QVariant alias) {
|
||||
|
@ -72,6 +72,7 @@ SOURCES += \
|
||||
utils/DoricImageBridge.cpp \
|
||||
utils/DoricInputBridge.cpp \
|
||||
utils/DoricLayouts.cpp \
|
||||
utils/DoricListBridge.cpp \
|
||||
utils/DoricMouseAreaBridge.cpp \
|
||||
utils/DoricSlideItemBridge.cpp \
|
||||
utils/DoricSliderBridge.cpp \
|
||||
@ -169,6 +170,7 @@ HEADERS += \
|
||||
utils/DoricImageBridge.h \
|
||||
utils/DoricInputBridge.h \
|
||||
utils/DoricLayouts.h \
|
||||
utils/DoricListBridge.h \
|
||||
utils/DoricMouseAreaBridge.h \
|
||||
utils/DoricNetworkService.h \
|
||||
utils/DoricObjectFactory.h \
|
||||
|
@ -45,4 +45,9 @@ ListView {
|
||||
console.log(tag, uuid + " onCurrentIndexChanged: " + this.currentIndex)
|
||||
}
|
||||
|
||||
delegate: Rectangle {
|
||||
Component.onCompleted: {
|
||||
// listBridge.getItemModel(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
doric-Qt/example/doric/utils/DoricListBridge.cpp
Normal file
3
doric-Qt/example/doric/utils/DoricListBridge.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "DoricListBridge.h"
|
||||
|
||||
DoricListBridge::DoricListBridge(QObject *parent) : QObject(parent) {}
|
15
doric-Qt/example/doric/utils/DoricListBridge.h
Normal file
15
doric-Qt/example/doric/utils/DoricListBridge.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef DORICLISTBRIDGE_H
|
||||
#define DORICLISTBRIDGE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
#include "DoricExport.h"
|
||||
|
||||
class DORIC_EXPORT DoricListBridge : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DoricListBridge(QObject *parent = nullptr);
|
||||
};
|
||||
|
||||
#endif // DORICLISTBRIDGE_H
|
Reference in New Issue
Block a user