Important: Please read the Qt Code of Conduct -

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");

    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