Thanks for your response.
No I have not done such. Are you confident that it should work using these?
To be hounest, I have no knowledge about how to handle them.
I want to exaplain a little bit more about my stuff.
Here are some pseudo lines from my application.
TreeView {
id: treeview
anchors.fill: parent
model: treemodel
style: TreeViewStyle {
branchDelegate: Rectangle {
//Only activated when a row is populated with children
width: 15; height: 15
Image {
source: styleData.isExpanded ? "images/minus.svg" : "images/16px/plus.svg"
}
.
.
.
onDoubleClicked: {
//Here is code which calls C++ to get data for children for a specific row (parent)
//If data was found, it is inserted as children into the model
}
TreeView {
id: treeview
anchors.fill: parent
model: treemodel
style: TreeViewStyle {
branchDelegate: Rectangle {
//Only activated when a row is populated with children
width: 15; height: 15
Image {
source: styleData.isExpanded ? "images/minus.svg" : "images/16px/plus.svg"
}
.
.
.
onDoubleClicked: {
//Here is code which calls C++ to get data for children for a specific row (parent)
//If data was found, it is inserted as children into the model
}
To copy to clipboard, switch view to plain text mode
Only when data is inserted as children branchDelegate is activated and the row will have a +.
When you click on that + it turns to - and children are visible on several rows. Works very well.
But it seems to be impossible to accomplish what I am looking for:
At double click, if no data is found mark the row with a different color or similar, maybe a red * instead of - or +.
In this case branchDelegate is not activated and I am unable to change branch image.
And the other thing am I looking for a solution to, as earlier written, indicate loading of data, that is for example turn row color to purple during loading.
Also seems impossible to achieve.
Bookmarks