TreeView with custom type for delegate
I just found a nicer way to achieve passing multiple values from the model to the delegate. You can register a custom type with the QVariant by using
You have to register that custom with qml:
qmlRegisterType<CustomType>("hvoigt.net", 1, 0, "CustomType");
You can then return a pointer of that custom type inside an
data()method of the model. Now you can use that instance of the custom type inside the qml delegate as you would with any custom type.
I have updated my TreeView example code with that:
It seems the reference to the original question does not work:
And it seems you can not open a topic without marking it as a question? Or did I just not find the button for that?
Double check the link, it seems there are
...in it that break the stuff.
You should be able to change the type of thread you want to start when writing it or later on with the "Topic Tools" button