Questions tagged [qurl]

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

65 questions
1
vote
1 answer

QString from Punycode QUrl

If I put url http://www.äsdf.de/bla/bla into QUrl, how can I then restore url with original symbols? It's ok that QUrl will fix some characters, but I'd like to display original äsdf in url instead of xn--sdf-pla. I am aware about QString…
ilya
  • 1,103
  • 14
  • 36
1
vote
1 answer

how to retrieve the string of a QUrl with space in it?

QUrl url("bword://blood transfusion"); QString res = url.toString(); Why I got the string "bword:" instead of "bword://blood transfusion"? How can I get the string "bword://blood transfusion" form the QUrl?
simpzan
  • 515
  • 6
  • 15
1
vote
1 answer

Remove `www.` from QUrl in Qt 5.5

So in another part of my program I read out various urls from my browser. Say I have http://www.example.com as well as http://example.com and https://example.com. For a browser, these three urls are different. To me, only the 'base' domain…
Philipp Meissner
  • 5,273
  • 5
  • 34
  • 59
1
vote
1 answer

QUrl: incorrect link

I have a link on Steam market listings: http://steamcommunity.com/market/listings/730/%E2%98%85%20Gut%20Knife%20%7C%20Safari%20Mesh%20%28Battle-Scarred%29 Now I'm trying to do a get request using QNetworkAccessManager: auto manager = new…
Efog
  • 1,155
  • 1
  • 15
  • 33
1
vote
2 answers

Http POST, selecting the page using Qt

i'm trying to authenticate in a online server, but i can't select the page that i want to download, here is my code: The Get request: QObject::connect(&access, SIGNAL(finished(QNetworkReply*)), &loop_get, SLOT(quit())); url_str = QString("http://")…
user2542813
  • 323
  • 3
  • 12
1
vote
1 answer

How can I include a percent sign in QUrl

I'm new in c++ from this afternoon and I am having a hard time. I have the below line: const QUrl command("http://192.168.11.11/subdomain/letters?t=somekeyword&p=%01") But when the QUrl "command" is sent used in QNetworkAccessManager, it is…
Carol
  • 1,852
  • 26
  • 29
0
votes
0 answers

Get the encodedOriginal in a QUrl

Is it possible to get the encodedOriginal from an invalid QUrl in Qt 4.7? If I parse it normally, it only give me a host that is invalid, so it's impossible to reconstruct the string with QUrl::host(). More info : If you go under the hood in QUrl,…
Acibi
  • 1,737
  • 3
  • 16
  • 22
0
votes
1 answer

Load an Image from QUrl to QImage (Qt Framework)

I am trying to load an image from QML using its source. In main.qml I have: Image { id: photoFiltering fillMode: Image.PreserveAspectFit width: parent.width height: parent.height/2 anchors.leftMargin: 20 anchors.rightMargin:…
Ahmad Wehbe
  • 53
  • 1
  • 7
0
votes
0 answers

Is it possible to pass a QBuffer from python backend to QML MediaPlayer?

I am trying to write a viewer for motionphoto pictures taken by my smartphone. The camera captures a few seconds of video before the image is taken and then saves both the video and jpeg file in the same jpeg file. [jpg binary data followed by mp4…
petr.z
  • 1
  • 1
0
votes
1 answer

How can i open HTML file on a specific header in QT?

I use help button (from QDialog) to open an HTML file, but i want it to open on specific header (

,

, etc.), depending on from which window i use help button. This is how i open…

a1rltt
  • 3
  • 3
0
votes
1 answer

How add URL or IMAGE-URL in QTextEdit

I have a QString, for example "https://google.com", I should convert from QString to QUrl and then add that QUrl in QTextEdit, when i click that URL, it will open https://google.com. The next question is, is it possible to make an IMAGE-URL? For…
user11841212
0
votes
0 answers

How to make a simple Http request using Qt? The http request contains percent encoding in the URL

I have one URL something as below: QUrl url("https://example.com/send/?apikey=somekey&numbers=mobile&sender=XYZ&message=0000%20is%20your%20OTP%20to%20authenticate%20with%20Server:%20abc.com") Now I call this URL as below: QNetworkRequest…
iammilind
  • 68,093
  • 33
  • 169
  • 336
0
votes
1 answer

QUrl Class's *addQueryItem* method

I want to query the Google map for all the roads leading to a given GPS coordinate. For that I'll have to place a "query" which can be done by: http://doc.qt.io/qt-4.8/qurl.html#addQueryItem Now I want to know how to figure out that what should be…
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
0
votes
1 answer

Reading percentage encoded url with umlauts with Qt

I am trying to read percentage encoded urls with umlauts, such as äüö,..., with Qt: QString str = "Nu%CC%88rnberg" qDebug() << QUrl::fromPercentEncoding(str.toUtf8()); But the output is Nu¨rnberg instead of Nürnberg. How can I correctly decode urls…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
0
votes
1 answer

Special characters in QUrl will be transformed to punycode

I'm having a textfield where the user can add an URL with I'm having a textfield where the user can add an URL with QUrl::fromUserInput() and it then will be put into a list. If I use special characters in the URL like "http://blöd.de/" it will be…
Vanessa
  • 49
  • 8