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. QProcess and curl aren't working
Forum Updated to NodeBB v4.3 + New Features

QProcess and curl aren't working

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 227 Views 2 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.
  • S Offline
    S Offline
    Sucharek
    wrote on last edited by
    #1

    Hi, I'm trying to download a file with QProcess, but I have a problem.
    The old "deprecated" way, it works fine, but the new one, it doesn't.
    Here's what I'm trying to do:

    QProcess dlPT;
    QStringList command;
    command << "-O" <<  "\"https://dl.google.com/android/repository/platform-tools_r33.0.2-windows.zip\""; //here's probably the issue
    dlPT.setWorkingDirectory(getUserPath() + "/AppData/Local/Temp");
    dlPT.start("curl", command);
    dlPT.waitForFinished();
    update("finished");
    stopRunning();
    

    I tried just command << "-O \"https://dl.google.com/android/repository/platform-tools_r33.0.2-windows.zip\"";, but that didn't work too.

    What am I doing wrong?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Why are you inserting double quotes for your URL ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Why are you inserting double quotes for your URL ?

        S Offline
        S Offline
        Sucharek
        wrote on last edited by
        #3

        Hi @SGaist, thanks, that was the issue.
        I didn't realize I kept it there.
        Thanks.

        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