QPainter::begin() return false on iOS



  • I'm trying to create and edit a Pdf-File on iOS. I used the QPdfWriter and QPainter. I doesn't work.
    On Android I using the same Code and it works fine:

    QPdfWriter printer("results.pdf");
    QPainter painter;
    
    QImage image(":/Images/emb8000.png");
    
    if (!painter.begin(&printer)) {
        qWarning("failed to open file");
        return 1;
    }
    
    painter.drawImage(40, 40, image);
    painter.drawText(10, 10, "My TexT");
    painter.end(); 
    

    The Output from the painter is: QPainter::begin(): Returned false.
    How can I create and edit a PDF-File on IOS?


Log in to reply
 

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