[Qt-interest] FieldWidth issue

Sujan Dasmahapatra sdh at lmwindpower.com
Thu Apr 21 11:49:22 CEST 2011


Dear Friends I am not able to align my set of number in a symmetric
manner. E.g

I have 

Standards    Special

1.0           0.2232322

2.4343433                   0.323232

 

How can I set them properly arranged some thing like this

Standards             Special

1.0                                           0.2232322

2.4343433              0.323232

 

I am trying like this

QTextStrea in(&file);

in.setFieldWidth(20);

in.setFieldAlignment(QTextStream::AlignCenter);

 

for(int i=0; i<2; i++)

in << n1 << "   "  << n2 << "\n";;

 

But I am not getting correct results. Thanks sujan

 

Kind Regards,

 

 

Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group

Tel    +91 80 66470248
Mob  

sdh at lmwindpower.com <mailto:%25EMAIL%25> 

 

LM Wind Power Blades

lmwindpower.com

 

Together we capture the wind to power a cleaner world

________________________________

 

This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110421/f3faed82/attachment.html 


More information about the Qt-interest-old mailing list