add newItem function to interface with QML
In order to make sure QML can properly interact with Rust I'll use a function in the proxy model to interact with the actual model underneath in Rust.
This commit is contained in:
parent
b2a87b76b6
commit
85285b7d02
3 changed files with 7 additions and 1 deletions
|
@ -299,7 +299,7 @@ Item {
|
|||
}
|
||||
|
||||
function addImg(url) {
|
||||
imageProxyModel.imageModel.newItem(url);
|
||||
imageProxyModel.newItem(url);
|
||||
selectedLibrary = "image";
|
||||
imageLibrary.libraryList.currentIndex = imageProxyModel.imageModel.count();
|
||||
console.log(imageProxyModel.getImage(imageLibrary.libraryList.currentIndex));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue