@Axel-Spoerl said in QtCreator debugger: display enum texts when used as array indexes, instead of 0,1,2...:
Re-translating that back into an enum, goes a long way. I doubt it will be implemented.
Which is all I said :)
On the model you are free to expose the internal structure. QStandardItemModel does it by exposing QStandardItem for example. However if you don't want to make use of the QAbstractItemModel interface and its seamless integration with views and delegate and just use your custom classes why bother subclassing a model in the first place? Just start from scratch. I'm not suggesting this is the most efficient way in terms of developer time but if performance is the only priority then feel free to go as low level as you can
@VRonin
Can you please provide an example or something to follow? Because I am still a newbie at both Qt and QML.
Sorry for bothering you with my many questions.
Update:
as you can see in the code, I change the state of the delegate through the mouse area in the delegate (it's commented out in the code). I was using it to test the states, now I've noticed another thing; Whenever I collapse the parent Item and then expand it, the previous states are not saved....does this have to do anything with what you mentioned?
I tried to understand by reading your description. I should appreciate your patience to write this whole description.
Coming to you issue, you are using model and view with View has single column. You are using the repeater. It is single column there. This requests for index with row and column=0. This is how it works always. If you are using TableView with appropriate TableModel then it will request for row and column values.
How do you construct comboboxes?
Do you assign it to the cell with QTableWidget ::setCellWidget?
If yes these combo boxes are completely independent widgets unrelated to QTableWidget.
So no itemChanged or any other table related signal is going to be sent when you manipulate with cell widget (unless you do it yourself).
In reality using cell widgets screw your table view navigation and selection.
I would highly recommend to avoid cell widget approach and leave it only for very simple cases.
In your case it probably would be better to use column specific delegates.
Recommendations from the top of my head:
find is a Spin Box Delegate example in documentation.
Make your own subclass similar to in example.
set autoFillBackground(true) to your editor widget in the createEditor method.
Set openPersistentEditor on your view's for desired rows/columns.