Error in receiving the unsigned char * (image)

  • i hve written the code like this

    QBuffer imagebuffer;
    qint64 bytes = imagebuffer->write((const char
    ) buf,sizeof(buf)); // buf is received unsigned char*
    imagebuffer->seek(imagebuffer->pos() - bytes);
    QImage receivedImage;
    qDebug() << "Image file was received ";



    when i execute this am getting error as
    segmentation fault

    can any body suggest me what and where is the error
    thank u

  • Lifetime Qt Champion


    Please enclose your code in coding tags, that will make it readable.

    As for your problem:
    You don't initialize imagebuffer

  • Please ask your question on the "General and Desktop forum":
    This forum is for contributions to Qt.

Log in to reply

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