I have a QTableWidget where I would like to populate on the fields with another QTableWidget.
This is something it would look like:
--------------------------
Name | Class | Section |
---------------------------
| | Some Text |
A | 1 | CheckBox 1 |
| | CheckBox 2 |
---------------------------
I want to add a Table B in each of the fields in the section column so that it is easier for me to deal with each checkboxes for each item in Table A (main Table).
Is it possible? Are there any better ways to approach this problem?
Use custom widget instead:
With
setCellWidgetyou can also add anotherQTableWidgetbut I think thatQWidgetwill be enough.You can add for example:
lineEdit->setStyleSheet("border:0px");and your lineEdit will be without borders or use justQLabelinstead, it is widget, do all what you need.Result: