Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Instantiate Qt widgets on slot of QTableView
I have a QTableView instance, that has two collums. The question is:
how can I instance QComboBox or QCheckbox or something like that into a slot of my QTableView?
Is there any possibility to display other widgets on the slots?
we have a "wiki page for that":http://qt-project.org/wiki/Combo_Boxes_in_Item_Views
for the checkbox part, have a look at checkable.
What model are you using?
thank you for the reply, I tried your suggestion out, but it doesn't work.
I use QTableView and QStandardItemModel. What did I make wrong?
Did you try the example?
What exactly goes wrong?
yes, I copied the example, but it doesn't displays the combobox on my QTableView. Please consider, that I'm using QTableView insted of QTableWidget.
What version of Qt are you using?
For a QTableView you could use :
tw.setModel(model); // your QStandardItemModel
hope it helps