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. What is the best way to show in progress bar the progress of file upload?

What is the best way to show in progress bar the progress of file upload?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 4.4k 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.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    I need to visualize in progress bar the status of file being uploaded to server .
    How do I do the calculations on this ?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      What do you mean? What are you using for upload?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        It depends on the classes you use for uploading your data. You might want to look into the "QNetworkReply::uploadProgress() ":http://doc.qt.nokia.com/4.7/qnetworkreply.html#uploadProgress signal and connect it to the progressbar.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          If you use a file you might want to use this:
          sendProgress->setValue( (fileToSend->pos() * 100) / fileToSend->size());
          The pos() functions comes from the QIODevice class, but it is inherited by QFile.

          Greetz, Jeroen

          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