1

I create a URL using QUrl.

void MainWindow::on_btnExecute_clicked()
{
    QUrl url;
    url.setScheme("https");
    url.setPath("myPath");

    QUrlQuery query;

    query.addQueryItem("myQuery", "query1");

    url.setQuery(query);
    const auto debug = url.toString(QUrl::FullyEncoded);
}

The string of the URL is "http:myPath" but I need "http://myPath"

I've tried toString(), toDisplayString() with different FormattingOptions but with no luck.

marco
  • 1,686
  • 1
  • 25
  • 33

0 Answers0