Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] QML Image: Error downloading http:.... - server replied: Not Acceptable
Qt 6.11 is out! See what's new in the release blog

[SOLVED] QML Image: Error downloading http:.... - server replied: Not Acceptable

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 5.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yazwas
    wrote on last edited by
    #1

    Good day

    I'm writing an app that has an rss feed part, but when trying to display the image within the rss feed, for example this image
    !http://static.sport360.com/sites/default/files/imagecache/uae_main_home/153269720.jpg(actual image)!

    using regular Image Item in QML, I'm getting this error:

    QML Image: Error downloading http://static.sport360.com/sites/default/files/imagecache/uae_main_home/153269720.jpg - server replied: Not Acceptable

    How to solve this problem

    Thanks!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      godbod
      wrote on last edited by
      #2

      Would you please post some code to give more details on your problem?

      L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yazwas
        wrote on last edited by
        #3

        I found the solution.
        https://bugreports.qt-project.org/browse/QTBUG-19259

        I had to provide a user-agent header to the NetworkAccessManagerFactory, somehow the server requested that.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          godbod
          wrote on last edited by
          #4

          Good you solved that problem.

          L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Hello,

            unfortunately the solution provided does not work with Qt Quick 2 anymore. On my Mac I get the following error while retrieving the user-agent (according to the problem report generated):
            bq.
            Crashed Thread: 0 Dispatch queue: com.apple.main-thread

            Exception Type: EXC_BAD_ACCESS (SIGSEGV)
            Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

            VM Regions Near 0:
            -->
            __TEXT 0000000100000000-0000000100009000 [ 36K] r-x/rwx SM=COW /Users/USER/*/UserAgentProvider.app/Contents/MacOS/UserAgentProvider

            Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
            0 QtWebKitWidgets 0x000000010002ba3f WebKit::initializeWebKitWidgets() + 47
            1 QtWebKitWidgets 0x000000010001e63f QWebPagePrivate::QWebPagePrivate(QWebPage*) + 207
            2 QtWebKitWidgets 0x0000000100022af7 QWebPage::QWebPage(QObject*) + 55
            3 com.yourcompany.UserAgentProvider 0x0000000100006527 UserAgentProvider::UserAgentProvider(QWidget*) + 39 (useragentprovider.cpp:5)
            4 com.yourcompany.UserAgentProvider 0x00000001000064ed UserAgentProvider::UserAgentProvider(QWidget*) + 29 (useragentprovider.cpp:6)
            5 com.yourcompany.UserAgentProvider 0x0000000100005d15 main + 149 (main.cpp:15)
            6 com.yourcompany.UserAgentProvider 0x0000000100005c74 start + 52
            bq.

            I suppose this has to do with using a QGuiApplication instead of a QApplication object as in Qt Quick 1.

            Any hints to get this working with Qt Quick 2?

            Regards

            DaBoba

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved