@anda_skota
Yes, I would require an element of a specific name, with defined method. Hoping something like this would work:
MyDataFilter.qml that contains
import QtQuick 2.0
MyDataFilter {
CheckBox {
id: normalizeData
text: qsTr("Normalize Data?")
checked: true
}
TextField {
id: prefix
placeholderText: qsTr("Enter Prefix")
}
Apply(dataArray) {
// read dataArray and using my QML settings and modify data...
}
}
import QtQuick 2.0
MyDataFilter {
CheckBox {
id: normalizeData
text: qsTr("Normalize Data?")
checked: true
}
TextField {
id: prefix
placeholderText: qsTr("Enter Prefix")
}
Apply(dataArray) {
// read dataArray and using my QML settings and modify data...
}
}
To copy to clipboard, switch view to plain text mode
So I would read the filters from disk, use their filenames to populate a list of filters that can be added, then each place a given filter was added show it's settings and invoke the Apply method on it.
So I preload the component and then each time a user adds it to a dataset I do something like:
QObject *object = component.create();
I'm not sure how to add this "object" into a scrollable list of QML defined filter objects like this? Do I need some sort of view container? Can they be put into a ListModel even though each item in the list has a different QML defined UI?
Thanks for the help!
Bookmarks