Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Add combobox in Header View
navap last edited by navap
Requirement : The combobox look and feel should be present at all times (not just on double click).
The table data should not be altered. Kindly let me know if there is a better approach.
I have tried certain ways:
- Reimplementation of QHeaderView : it would result in static controls which are immovable in horizontal scroll
- Added delegates : but tableview->horizontalHeader()->setDelegateItem doesnot seem to work
- Adding delegates : Upon forcefully adding comboboxes in tableview first row (first row data is getting compramised), the model class will override my combobox selection when i "setmodal". And the combobox selection will not stick if I reimplement paint method.
Thanks in Advance.
I would Like to add a snapshot as well. But I am not sure how to add here.
Kindly let me know the same
Hi and welcome to devnet,
Have a look at this blog post. It looks exactly like your use case.
Hope it helps
navap last edited by
Hi SGaist! Thanks for reply!
I had tried this and it will result in static controls being placed on header.
Upon Horizontal scroll to right/left, it will appear immovable.
Thanks for the info though!