@SGaist I have tried to get an example to the problem I saw apparently, but I did not succeed. For a simple radio button it is working, but the layout's margins need to be set to 0 either with setMargin or setContentsMargins. For the small example I have generated I had introduced also the derived class I used and it seems to work there. Therefore, there must be another problem with the QTableWidget's implementation or I simply fall into a trap. Therefore, I will mark as solved.