QComboBox in QTableWidget using QT Designer
-
Hi,
I wanted to add a QComboBox on a particular cell in a QTableWidget using Qt Designer. However, I could not find any option on the property tab or maybe any functionality by which I can merge them.
First Question: Is there any way by which I can achieve this using Qt Designer?
As per my research, we can only add the QComboBox while programming, in my case, python. So, I added QcomboBoox dynamically within the QTableWidget through code. But, then I am not able to use the combobox signals.
Second question: Can I capture signal when I add the combobox dynamically through the code?
Screenshot of my table below:
-
@Piyush said in QComboBox in QTableWidget using QT Designer:
First Question: Is there any way by which I can achieve this using Qt Designer?
No
Second question: Can I capture signal when I add the combobox dynamically through the code?
You should not use
setItemWidget
but rather a delegate (viasetItemDelegate
). A C++ implementation can be found here:
Header
Source