PDA

View Full Version : Help with QTextTable



fwohlfert
31st October 2006, 21:09
I am trying the QTextDocument for the first time and I have a QTextTable that I am trying to insert a database field (double) into a cell.
I have been over the documentation but I am missing something, I tried to use the QTextFormat::doubleProperty() but I could not get it to work.
Does anyone know of a good example, or have a snippet that I could review.

Thanks in advance
Fred Wohlfert

jrideout
1st November 2006, 09:05
The function you want is QString & QString::setNum ( double n, char format = 'g', int precision = 6 ) (http://doc.trolltech.com/4.2/qstring.html#setNum-9). You can then put your QString in the table.