QFontMetrics fm = painter->fontMetrics();
QPrinter *printer = new QPrinter;
mPixelPerCentimeter = printer->resolution()/2.54;
foreach(QString str,szTable)
{
	double tempWidth = fm.width(str)/mPixelPerCentimeter;
	width = qMax(tempWidth,width);
}					
double height = fm.height()/mPixelPerCentimeter*szTable.size();//mutiply line