Unsolved Print checkbox box into file pdf
-
Hi everyone,
I would need some advice: how can I print a checkbox item (to understand a checked or unchecked box) in a pdf file?
I state that I create the pdf file with Qprinter.
I tried to create a checkbox with html tags and through QTextDocument and then setHtml only prints the label part of the checkbox and not the box.
How can I do it? -
-
Thanks JonB, but nothing .. unfortunately it doesn't work and I don't print the box ...
-
@Safer
If you say so, I thought the Accepted Solution there looked like it might work.If not then it's obviously not easy/possible to get a checkbox. Can only suggest you might have to make do with, say, an
X
for a checked box. -
the important thing is that the checked or unchecked box is displayed in the pdf file statically, that is, I am only interested in printing it .. then for check management I will do it with the software code before printing
-
Hi
You can render a QCheckBox to QPrinter.
https://doc.qt.io/qt-5/qwidget.html#render
Not sure if you mean a real checkbox or some HTML something.