I want to display data in a spreadsheet like format on the screen.
I used QTable to set columns and column widths.
I have 5 columns.
column1 has 7 as column width
column2 has 30 as column width
column3 has 36 as column width
column4 has 30 as column width
column5 has 30 as column width.

But, with the specified font and font family, size, I should display the column width with label. There will be no scrollbar, no mouse.

I had taken QFontMetrics fm(QApplication::fontmetrics());
fontWidth=fm.width("W");//widest character width in pixels
so for column1 = 7 * fm.width("W");
But, it is going beyond screen limits for all the columns to display.

please solve my problem. If you are not clear with this, please revert back.