Help in software design and coding
I'm developing a software and I need your help to design something with me as I'm a beginner in a few things (read beginner in model-view-delegate). In order to simplify things here I'm going to be using not real classes but metaphorical ones.
The reason is that I haven't coded yet the thing I have in mind and I need help understanding a few things.
The base idea: create a tree view based on the output from the class
Cis a kind of manager that calls a method from
Ahas a list of
Bhas a list of
Eis a kind of a container just like
Bbut holds a list of
And above that is the three how it would look like.
The question is: what would be the best way to do that?
1º - Using an interface for
Eso I can return a list of a certain interface on
Cto the model.
2º - Use
QVariantto return either
Eas a list from
Cto the model.
I don't know what would be the best option.
I would probably need to create a custom model to handle the
HELP ME PLEASE. SOS.
Is there anyone to help me with that?
First thing: Introduction to Model/View Programming. This is a mandatory read when you want to get started with model view programming with Qt.
From what you describe the model you would need to implement would be a wrapper around your structure of data. So basically you must first ensure that said structure is coherent and that you can manipulate it the way you need it. Once that done you can put a model on top of it.
On a side note, please be patient. Allow up to 24 hours before bumping your own thread. People answering do it on their own time and they don't live necessarily in the same timezone as you. Furthermore, it's the weekend.