Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkAccessManager Signals and Slots

QNetworkAccessManager Signals and Slots

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 915 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.
  • E Offline
    E Offline
    elveatles
    wrote on last edited by
    #1

    Hello,
    I'm using a single QNetworkAccessManager object to load many thumbnails at once. I've been able to do this just fine, but I'm having problems sending signals to the correct slots.
    If each thumbnail object connects to the finished signal of the one QNetworkAccessManager, then they all get the finished signal for each thumbnail downloaded instead of only one thumbnail per finished signal emitted.
    What's an elegant way to deal with this?

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      Create a thumbnail manager that connects to the finished signal, rather than a set of thumbnail objects that manage themselves.

      QNetworkAccessManager::finished() includes a reply object that provides information for mapping back to the original request. Create a mapping from some identifiable portion of the request to the object displaying the thumbnail.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      0
      • E Offline
        E Offline
        elveatles
        wrote on last edited by
        #3

        Thanks for the quick reply. I've got this working.

        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