How do you add a widget to a table cell in Qt Designer?
-
Apologies if this has been asked before, but is there a way of adding a widget such as a combo box to a cell in a table widget using Qt Designer?
I've found references to doing it in code, but is it possible through the interface?
-
bq. I’ve found references to doing it in code, but is it possible through the interface?
Unfortunately, I'm afraid you will have to do it from your source code.
Furthermore, depending on your use case, you might consider using a "QStyledItemDelegate":http://doc.qt.nokia.com/latest/qstyleditemdelegate.html to provide your combobox.
-
Have a look at the "Combo Boxes in Item Views":http://developer.qt.nokia.com/wiki/Combo_Boxes_in_Item_Views wiki article for an example on how to achieve this.