Preview forms before saving into database
-
Hi, I have two windows . I want to preview the entry made before saving. Any documentation or library that could make this possible? Thanks in advance
@LT-K101 said in Preview forms before saving into database:
I want to preview the entry made before saving
Please explain better: what kind of preview? PDF?
-
@LT-K101 said in Preview forms before saving into database:
I want to preview the entry made before saving
Please explain better: what kind of preview? PDF?
-
@jsulm I would like to preview all entry I have made before i click on the submit Button and if possible print all entries as it is. Below is the image of my window.
-
@LT-K101 I still don't understand. In what way "preview"?
The entries you made are already shown in the UI or not?"and if possible print all entries as it is" - print on a printer?
Please explain better...
-
@jsulm You're right . All entries are already in UI and I would want to print on a printer but before I print, I should see what I'm about to print.
@LT-K101 Then, well, print? The easiest way for you to go about, I think, would be:
- gather everything in the textual form in one QString;
- use QTextEdit on QDialog to display to data from the QString using QTextDocument and allow the user to accept/decline;
- if user accepts, create QPrinter and use QTextDocument::print().
All the classes are well documented. Of course, you can fiddle around with rich text (rich text in Qt is well documented too), printer selection and options and what not.
EDIT: since it might be unclear - the QTextDocument is not necessary here but using it saves all the work with rendering text, as the print() method takes care of laying out the text, page breaks, etc.
-
@LT-K101 Then, well, print? The easiest way for you to go about, I think, would be:
- gather everything in the textual form in one QString;
- use QTextEdit on QDialog to display to data from the QString using QTextDocument and allow the user to accept/decline;
- if user accepts, create QPrinter and use QTextDocument::print().
All the classes are well documented. Of course, you can fiddle around with rich text (rich text in Qt is well documented too), printer selection and options and what not.
EDIT: since it might be unclear - the QTextDocument is not necessary here but using it saves all the work with rendering text, as the print() method takes care of laying out the text, page breaks, etc.
-
Hi,
QPrintPreviewDialog can be used before you start inking paper for your tests.
-
Hi,
QPrintPreviewDialog can be used before you start inking paper for your tests.