Hi,

I am quite new tho Model/View approach and I need your help. I am reading a text file and want to display data in a tableview. I already looked at example codes but they are very basic and my requirements are very different.

Text from file looks like:
Qt Code:
  1. Page Address Name
  2. ....
  3. 1 0000abda _CpuTimer1
  4. 1 0000abe2 _CpuTimer2
  5. 1 0000abea _CpuTimer0
  6. 1 0000abf2 _msg
  7. 1 0000abf4 _res
  8. ....
To copy to clipboard, switch view to plain text mode 
I store those information to a QVector of following typedef:
Qt Code:
  1. typedef struct St_Register
  2. {
  3. QString name;
  4. quint16 page;
  5. quint16 address;
  6. quint32 currValue;
  7. quint32 wrValue;
  8. bool wrProtect;
  9. } Register;
  10. ...
  11. QVector<Register *> Registers;
To copy to clipboard, switch view to plain text mode 
But as soon as I store the data into Registers vector, It should update the table automatically.
I want to show Name, Page, Address, currValue information in the table as not editable strings. I want to show wrProtect as editable checkbox and wrValue as editable spinbox.
When I check the checkbox, the wrValue should be editable, otherwise not editable.
So, Is my data-model only this QVector? QVector<Register *> Registers;
Do I need customized checkbox delegate and spinbox delegate? If yes, how? How can I "connect" those specialized delegates to tableView (or to model)?
I need a step-by-step instruction for implementing of creating all required classes (pseude-code is enough).

Thanks.