PDA

View Full Version : QString Trick please



baray98
23rd May 2008, 18:58
I have the output below to a text browser using QTextBrowser::append()
but I want to allign the columns in a more arranged manner (not like a snake type alignment) . so how can I accomplish this with QString ? Each row will be produced by function that returns a QString. I have tried

QString:: arg ( const QString & a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' ) ) const

with the fieldWidth to be uinform but it seems that output is still mis alligned is there any other way of somehow formatting QString in some uniform width?


Item , Configured, Detected
Software Version, 0, 0
Hardware Version, 0, 0
FPGA Version, 0, 0
Serial No., 0, 0
IP Address , 0.0.0.0, 0.0.0.0
Global Id , 0, 0

note: "comma" is the end of a column


baray98

marcel
24th May 2008, 00:58
Put it in an html table and set the resulting html in the text browser.