How to get the source QString instance from a QUrl instance which is invalid?
Unsolved
General and Desktop
-
I have constructed a QUrl instance like below.
Here is a output from PyQt4, actually i use Qt5, but it isn't installed on this machine, so it's just a sample code to demonstrate my problem.
In Qt5, i want to get the source string "test.pro://account=" from the QUrl instance, how can i achieve it?
What i have done?
The QUrl class have a private class which is named QUrlPrivate which contains a struct named Error. The Error structure contains QString source which is actually what i want. But i don't know how to access it usinig public API from QUrl.
Thanks for helping.
-
Hi,
Since you have your variable named
source
, why not re-use it if something fails ?