Hi,
I am using a QTableWidget where i have to set the name of 2 columns with the same name, ie column header for column 0 and 1 should be "Name". How can i club the header name for two or more columns???
thanks & regards
sudhish kapoor
Hi,
I am using a QTableWidget where i have to set the name of 2 columns with the same name, ie column header for column 0 and 1 should be "Name". How can i club the header name for two or more columns???
thanks & regards
sudhish kapoor
Last edited by kapoorsudhish; 18th November 2009 at 12:27. Reason: updated contents
what do you mean with "club"?
I think club has the meaning span, and there is no easy Qt way for that. You might want to have a look at HierarchicalHeaderView: http://qt-apps.org/content/show.php/...content=103154
by clubbing i mean two columns having the same column name like we can merge columns in the excel sheet attaching the screen shot for the same.
for the header there is no option. Is it inside the table use QTableView::setSpan().
i am finding it confusing to use the setSpan() function, as to what should i pass to the function to achieve the attached image format. please help me in using the a above function.
thanks,
sudhish kapoor
This is called merging cells not merging columns.
You can use QTextTable::mergeCells() for that.
Thanks for the response but i actually want to merge the columns like two columns having the same heading. i dont know which function to be used for sure i dont want to merge the cells but i want to merge the columns headers for two cells.
thanks,
sudhish kapoor
Bookmarks