Important: Please read the Qt Code of Conduct -

How do I print long widgets continuously without cutoff?

  • At QT(5.12), I made the ui with QWidget. And I want to print the ui with my printer. But, The ui is too long to print on one page.(height is greater than the A4 size) I want continuous prints without newPage() function.

    I use QPrinter and QPainter. But, The result I received was a cropped widget image. Is there any option or code that prints automatically on the next page like MS Word?

    QPrinter printer;
    QPainter painter;
    QPrintDialog printDialog(&printer);
    if (printDialog.exec() == QDialog::Accepted) {