QNetworkProxyQuery query(QUrl(QStringLiteral("https://service.example.net/")));
const auto candidates = QNetworkProxyFactory::systemProxyForQuery(query);

This Qt Network query inspects policy for one URL. Include the corresponding Qt Network headers. It does not open a connection or identify the route for every socket in the process.

QNetworkProxyQuery includes destination information and a query type. TCP, UDP and server operations can need different capabilities from an HTTP caching proxy or HTTP tunnel, or a SOCKS proxy. Query the failed operation rather than a convenient unrelated public page.

Interpret each candidate's type. NoProxy deliberately selects direct access; an empty-looking host in that result is not a discovery failure. Preserve preference order and alternative candidates.

When routing should remain dynamic, use the supported system-configuration or proxy-factory integration for the participating socket or QNetworkAccessManager. Freezing the first result as a fixed application endpoint discards later per-destination decisions. Inspect the actual manager or installed application factory: a diagnostic call beside it does not prove it uses the same policy.

An embedded browser can have a different network stack from Qt Network. A valid Qt-socket candidate does not establish that every component supports the same protocol or authentication.

Artiglyn mynjee