Important: Please read the Qt Code of Conduct -

Printing contents of entire QGraphicscene

  • I m using a subclass of QGraphicscene i.e class 'a' which has a public member QGraphicsview *view.
    I want to print the entire scene and not the view.
    I tried
    QPrinter printer;
    if (QPrintDialog(&printer).exec() == QDialog::Accepted)
    QPainter painter(&printer);
    but it is printing blank page.
    How do i go about this?Please help!

Log in to reply