Hi,
I am using QtableWidget and want to set the default width of row and column. So that every time new row is added and there is no need to set the width.
Thanks & Regards
Hi,
I am using QtableWidget and want to set the default width of row and column. So that every time new row is added and there is no need to set the width.
Thanks & Regards
Are you looking for something like this:
Qt Code:
tableWidget->setColumnWidth( 0, 160 ); tableWidget->setColumnWidth( 1, 100 );To copy to clipboard, switch view to plain text mode
Hi,
Thanks for reply but i need this
table->horizontalHeader()->resizeSection(column,10);
table->verticalHeader()->resizeSection(row,10);
column and row need to passed only once. I don't want to set again and again
Put the code I have posted above into the header (once for each column). No need to do it again and again ...
But may be this is what you are really looking for:
Qt Code:
tableWidget->verticalHeader()->setDefaultSectionSize(50); tableWidget->horizontalHeader()->setDefaultSectionSize(200);To copy to clipboard, switch view to plain text mode
Hi,
Thanks It works as I want
Bookmarks