How to generate report in PDF/CSV format
-
Hi, i am trying to generate a report using test results to a table. How can i generate a table and push the test results to the table using QT. Can a table be drawn as shown in the sample reference image below and fill data in blank spaces from code. Kindly help me
-
@Rajesh-Panati
In a word, you're going to have write whatever code yourself. You can probably achieve the output above with a dedicated form layout hand-designed, though it will take some work. The literal text will beQLabel
s and the "blanks" will beQWidget
s likeQLineEdit
. You could have a custom data model behind it, possibly with aQDataWidgetMapper
if you want to tie the widgets input/output to the model. It will not be a "click in blanks to type" in the way it can be in, say a PDF form editor, though you could make it such if you really wanted, but not straightforward.You can write code to read/write a CSV file mapped to the model, or directly to the widgets. Once you have your form filled in, you can send it as the visual page to a PDF printer/exporter.