Custom item delegate with multiple combo boxes
Hi! I'm trying to do the following :
While editing a table cell user should have several comboboxes, which are replaced with text after the choises are made (e.g.:)
(text in the centre of a cell)
When comboboxes have been replaced with text, user should be able to add another group of comboboxes to THE SAME cell, like this
The user's choices in each group of comboboxes should update SQL table.
Text, which appears after choice should have basic formatting (bold,italic)
How shall I do this? implement a delegate, or implement widget with comboboxes, and set cell widgets in QTableWidget, or what?
Need some advice.
Thanx in advance!
Edit: As requested by poster, original posting was modified to reflect this second, more elaborate version; Andre
What do you want to do? Several combo boxes in one cell sounds very weird.
Did you look at the SQL table models yet?
I just merged in the above posting (which used to be a separate topic) into this topic, as it seems to concern the same problem. Please keep a single issue in a single topic.
At users request, the first posting was replaced by the posting that was above this one originally.
my first posting used to be a reply in another topic, moderators made this topic of that reply. I would appreciate, if you deleted first posting, and make topic of the second posting. (people get embarrassed with first). thank you.
[quote author="bright day" date="1305294528"]my first posting used to be a reply in another topic, moderators made this topic of that reply. I would appreciate, if you deleted first posting, and make topic of the second posting. (people get embarrassed with first). thank you.[/quote]
Done. I hope this suits you better?
It does ) Thank you.
bq. Did you look at the SQL table models yet?
I did a little, I'm new to Qt and would appreciate any advice to pick the right way.
Well, the usage pattern you describe is not very clear (especially the part about changing to text, and then be able to add another block of combo boxes) and, for so far it is clear, looks very strange. I think we're going to need more details on this, and I also think you should perhaps re-think your UI design...
There is a reason why what you want is complicated, and that is because it probably is not a good idea.*
*) I don't mean to imply that everything that is complicated is a bad idea though