by default ,the header of qtablewidget has the some column numbers with the tabwidget,
so ,if the tablewidget has 2 columns, the header also has 2 columns,
now I want to implement the header by myself,
I want to create a header only has one column, and add some button on it , how can I achieve that?
How about this:
Put qtablewidget and pushbutton inside qvboxlayout. Set item spacing for layout to 0. Hide horizontal header for qtablewidget and you should get this:
If you are doing this in code, use this: