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] Howto download HTTP (GET)
Qt 6.11 is out! See what's new in the release blog

[solved] Howto download HTTP (GET)

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 3.7k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello.

    How can I download a website via something like httpget to e.g. a string ?

    Thank you

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Did you have a look to the "HTTP example":http://developer.qt.nokia.com/doc/qt-4.8/network-http.html aready?

      Vote the answer(s) that helped you to solve your issue(s)

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

        Can this also be realized more easily within the qml without additional files?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          Please be aware that while QML is excellent for creating beautiful and fluid interfaces, for most heavy lifting you will need to use C++ files to fill in the needs of your application logic.

          The intent is not to be able to do all things with QML/Javascript instead of C++ (though there is a lot that can be done within that space.)

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

            Actually xmlhttprequest would make this easy...

            http://qt-project.org/doc/qt-4.8/declarative-xml-xmlhttprequest-xmlhttprequest-example-qml.html

            If you just want a text string then change this line:

            @var a = doc.responseXML.documentElement;@

            to

            @var a = doc.responseText;@

            I hope that helps.

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

              Thank you!

              This worked great!

              I didn't think, that it is so easy.

              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