Could you please let us know how to achieve following cases while implementing the editor of the header title based on the QWidget which we have to embed in table header?
Case 1) How to get the column header size so that we can embed the QWidget of similar size to the column header.
Case 2) How to remove boundaries from the label which we embed to the header so that it doesn't look like a separate widget inside the header.(Please refer tableHeaderWithLabel.PNG)
Currently, we have tried the following approach to remove the boundaries from the label but boundaries are not gets removed
We have created the custom label so that we can can get the double click event on it.
Case 3)Is there any signal present which gets emitted when we perform resize of a column.
We want to resize the label based on the changes done to a column so that it doesn't look like a separate widget present in the header.
You do not need to know the width of the column. When embedding, the grid manages the width of the qwidget and stretches it to the full width of the column automatically.
I have updated the RelationModel sample to embed the Qlabel to the ID column.
Please let us know if you need anything else
However, in your example, you tried to limit the width through setFixedWidth and you did not succeed. This is a bug in our code, in the upcoming version it will be fixed.
>>How to remove boundaries from the label which we embed to the header so that it doesn't look like a separate widget inside the header.
Unfortunately, it is not possible in current version. We added a new param to GridTableColumnEditor constructor that allows you to set the border thickness.