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);
    painter.setRenderHint(QPainter::Antialiasing);
    a->render(&painter);
    }
    but it is printing blank page.
    How do i go about this?Please help!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.