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. Declare multiple png's on a path
QtWS25 Last Chance

Declare multiple png's on a path

Scheduled Pinned Locked Moved Unsolved General and Desktop
mapqt5location
4 Posts 3 Posters 579 Views
  • 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.
  • D Offline
    D Offline
    deleted286
    wrote on 19 Jan 2021, 13:25 last edited by
    #1

    I have some tiles of my map, it is about 10 png. How can i declare them in a path?
    ```

    QString path = "file:///C:/Users/ilknu/Downloads/Maperitive-latest/Maperitive/output/1.1.png";
        m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y()));
        QNetworkRequest request;
        request.setUrl(m_url);
        request.setRawHeader("User-Agent", "The Qt Company (Qt Graphics Dojo 1.0");
        request.setAttribute(QNetworkRequest::User, QVariant(grab));
        m_manager.get(request);
    }
    
    J 1 Reply Last reply 19 Jan 2021, 13:31
    0
    • D deleted286
      19 Jan 2021, 13:25

      I have some tiles of my map, it is about 10 png. How can i declare them in a path?
      ```

      QString path = "file:///C:/Users/ilknu/Downloads/Maperitive-latest/Maperitive/output/1.1.png";
          m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y()));
          QNetworkRequest request;
          request.setUrl(m_url);
          request.setRawHeader("User-Agent", "The Qt Company (Qt Graphics Dojo 1.0");
          request.setAttribute(QNetworkRequest::User, QVariant(grab));
          m_manager.get(request);
      }
      
      J Online
      J Online
      JonB
      wrote on 19 Jan 2021, 13:31 last edited by
      #2

      @suslucoder said in Declare multiple png's on a path:

      How can i declare them in a path?

      What does this mean?

      Anyway, so far as I know, you have to get them one at a time.

      D 1 Reply Last reply 19 Jan 2021, 13:35
      0
      • J JonB
        19 Jan 2021, 13:31

        @suslucoder said in Declare multiple png's on a path:

        How can i declare them in a path?

        What does this mean?

        Anyway, so far as I know, you have to get them one at a time.

        D Offline
        D Offline
        deleted286
        wrote on 19 Jan 2021, 13:35 last edited by
        #3

        @JonB I saw this thing on github

        QString path = "https://b.tile.openstreetmap.de/%1/%2/%3.png"; //"file:///D:/Software/RFmail/tiles/%1/%2/%3.png";
        

        Doesnt it contains 3 png? I've tried the same thing but it doesnt work

        J 1 Reply Last reply 19 Jan 2021, 13:43
        0
        • D deleted286
          19 Jan 2021, 13:35

          @JonB I saw this thing on github

          QString path = "https://b.tile.openstreetmap.de/%1/%2/%3.png"; //"file:///D:/Software/RFmail/tiles/%1/%2/%3.png";
          

          Doesnt it contains 3 png? I've tried the same thing but it doesnt work

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 19 Jan 2021, 13:43 last edited by jsulm
          #4

          @suslucoder said in Declare multiple png's on a path:

          Doesnt it contains 3 png?

          No
          You should check the code to see what it does with that string.
          %1, %2... are used to format string, see https://doc.qt.io/qt-5/qstring.html#arg

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          1/4

          19 Jan 2021, 13:25

          • Login

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