Here is the current status:
On windows (qnetworkproxy_win.cpp), Mac-OS X (qnetworkproxy_mac.cpp) and Symbian (qnetworkproxy_symbian.cpp) most of the stuff is working and well integrated with the system. I'm still not sure what happens on those platforms when a PAC file is used, but that could easilly be fixed once it works correctly on Linux.
On others systems (mainly Linux) it's impossible to get the system proxy. I proposed a solution using libproxy (see https://qt.gitorious.org/qt/qt/merge_requests/1234) but thiago thinks it's not a good solution.
Instead, Qt should use, in order:
The environment variable stuff should probably be enabled as a fallback mechanism on most system.
Note that NetworkManager, or even env variables can specify a pac file. Here we should use a QtScript based pacrunner to find the right proxy the each request. Previous comments already pointed out some Qt based implementations, here is another one http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/script_8cpp_source.html .
Ref: https://bugs.meego.com/show_bug.cgi?id=13841 (Unable to procure system proxy settings using QNetworkProxyFactory::systemProxyForQuery or QNetworkProxyFactory::setUseSystemConfiguration)
The next step is to re-affect this bug to Qt 5, and find someone with time to fix it ...