Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt program: How to check internet upload and download speed ?

    General and Desktop
    3
    5
    3062
    Loading More Posts
    • 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
      developer87 last edited by

      Hello,

      I am new in Qt programming. I need to create an widget which will calculate and show internet speed (upload and download) on my machine.

      Please share me the logic to achieve it using any Qt library or any API.
      If possible please provide example code, that will more helpful for me.

      Thanks in advance

      Regards
      developer87

      1 Reply Last reply Reply Quote 0
      • mrdebug
        mrdebug last edited by

        It' very easy. You have to download and upload something from a very fast internet web server.

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply Reply Quote 0
        • D
          developer87 last edited by

          Hi mrdebug,

          Thanks for quick reply, I found same explanation that try to transmit something on server, but not really getting how to achieve and logic to calculate speed via Qt program.

          If possible please share me any sample code to get exact idea of this logic implementation. I would be more helpful for me.

          Thanks.

          1 Reply Last reply Reply Quote 0
          • mrdebug
            mrdebug last edited by

            You have to download a particolar file. After it's will arrived you can calculate de kb/s.
            Download from many server is better because somethimes the speed is different.

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            1 Reply Last reply Reply Quote 0
            • X
              Xander84 last edited by

              Hi, you can use the QNetworkAccessManager or a custom QTcpSocket to do the speed test. Look at the examples in the Qt doc or the networking examples.

              If you don't want to download and upload a file you can also try determining the actual down and upload rates form your router via UPnP. Don't ask me how to do that, but it is possible, of course only if you have a network router with UPnP enabled so it might not work all the time and testing the speed is more reliable.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post