Questions tagged [qurl]

Class for handling URLs from Qt. Handles storage and encoding.

65 questions
0
votes
1 answer

Unable to store Downloaded file from url in QT 4.8

I am trying to download a xml file using url in QT 4.8. Here is my code for this:- downloadurl::downloadurl(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { ui.setupUi(this); QNetworkAccessManager…
Tabish Saifullah
  • 570
  • 1
  • 5
  • 25
0
votes
1 answer

How POST QList of int to my webservice in qt?

I have an QList of int and I want with post request send it to web service QList list; QUrlQuery query ; QNetworkReply* reply= postRequest(query,"www.myapi.com/api/Book/SaveDigits");//a method that will send POST…
mohsen
  • 1,763
  • 3
  • 17
  • 55
0
votes
1 answer

How can I directly input HTML code in QtCore.QUrl without referring to file path?

I am building an app in Python using PyQt5 and I am going to freeze it. Therefor I would like to have my python code independent from any local file path. At some point I am loading an html code…
Carlo Bianchi
  • 115
  • 4
  • 15
0
votes
1 answer

PyQt5: How to print a QUrl without the module name

I am trying to grab a url from the web, but no matter what I do, it also prints the entire module for the QUrl: import sys from PyQt5.QtCore import QUrl from PyQt5.QtWidgets import QApplication from PyQt5.QtWebEngineWidgets import…
Storm Shadow
  • 442
  • 5
  • 12
0
votes
1 answer

qt QUrl Opening a pdf

I am trying to open a pdf file with the default application through Qt's "DesktopServices" class. But I am coming up with a ShellExecute 'file:///C:/PMPS/PMPSv1/Instuctionsforuse.pdf' failed (error 2). problem. Here is my code: #include…
0
votes
1 answer

Qt - Download Data from url

I wrote a web service with PHP. I need download content via web service URL. How can I download data from URL? Which libraries are needed?
MahdiY
  • 1,269
  • 21
  • 32
0
votes
1 answer

QUrl construction piece by piece

I tried to construct QUrl piece by piece: QUrl url{"https://host.org/path"}; url.setScheme("http"); url.setPort(81); url.setUserName("user"); url.setPassword("password"); url.setHost("server.com"); QUrlQuery…
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
0
votes
1 answer

No member named 'addQueryItem' in 'QUrl' - Convert Qt 4.7 to 5.8

I need to convert Qt legacy code from 4.7 to 5.8, I have a compilation error in Qt Creator 4.2.1 Clang 7.0(Apple) 64bit. Looking in .cpp file QList priceGetterTSP::downloadFile(const QString &symbol_, int beginDate_, int endDate_) { …
bullflag
  • 99
  • 1
  • 8
0
votes
1 answer

Qt QUrlQuery extract Qbytearray token

Possible duplicate Question I am generating a reset link/token that will be emailed to the client as follows. QByteArray token; token.resize(crypto_pwhash_SALTBYTES); randombytes_buf(token.data(), crypto_pwhash_SALTBYTES); QUrlQuery…
ArchNemSyS
  • 367
  • 2
  • 4
  • 17
0
votes
1 answer

Sending mail with line breaks using QDesktopServices::openUrl

I tried to send an e-mail with a prepared subject, receiver and body using Qt. The mail shall open in the system default mail client. I am testing on Linux with KMail and Qt 5.5. This is the code I intended to…
Silicomancer
  • 8,604
  • 10
  • 63
  • 130
0
votes
0 answers

QUrl doesn't work with parts from text file (Qt c++)

I want to make an URL with some parts extracted from a text file. I have the following code: crack_order = new QFile("orders.txt"); //I have QFile *crack_order in headers crack_order->open(QIODevice::ReadOnly); while(!crack_order->atEnd()){ …
winker
  • 1
0
votes
1 answer

Connect QML signal of arbitrary placed .qml-file to Qt slot

I am trying to connect QML signal to Qt slot. I have read that example and here is code int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); qDebug()<
lnk
  • 593
  • 2
  • 11
  • 27
0
votes
2 answers

QT: QUrl with no percent encoding

QT: I was wondering if there is a way to create a QUrl or another URL class object from string without encoding the final URL. For example, here is a snippet of my code: QString GetJsonStringFromURL(QString url) //url ==…
0
votes
1 answer

Qt: QUrl::fromUserInput intepretes FTP Url wrong

I have some issue in passing a FTP string into QUrl: std::cout << QUrl::fromUserInput("ftp://user@host.com:password@ftphost:21/path/file.ext").toString().toStdString().c_str() << std::endl; Is always resulting in…
sarahara
  • 65
  • 6
0
votes
0 answers

Download a file from a server using QT5

I am trying to access a file from a server but instead of getting the desired file I get index.php. If I use a URL like http://domain.com/file.mp3 works fine but I need to use a url like "http://domain.com/index.php?security=access_recording". If I…
dominic
  • 105
  • 2
  • 9