Important: Please read the Qt Code of Conduct -

Image. Server replied: Not Acceptable

  • I am allowing my users to add images as attachments, so the user provides a link, and I set it to the 'Image' item. But for some servers I get this error:

    qrc:/AttachmentList.qml:40:25: QML Image: Error transferring - server replied: Not Acceptable

    Investigating further, I found that this is some problem with User-Agent string. But how do I change this value if I don't have access to QML internals?

    My QML source goes like this:

                    Image {
                            id: attach_img
                            source:  (model.type===Attachments.A_TYPE_IMAGE) || (model.type===Attachments.A_TYPE_YOUTUBE) ? model.display_url : ""
                            width: app.width  * 0.9
                            fillMode: Image.PreserveAspectFit

  • Hi @Nulik , i think the user-agent string needs a valid value,i guess QQmlNetworkAccessManagerFactory Class can you help you in that,you can have look into the documentation [].

Log in to reply