Unsolved QNetworkAccessManager.setNetworkAccessible() is obsolete in Qt 5.15?
-
in Qt 5.15, The following members(include setNetworkAccessible()) of class QNetworkAccessManager are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
But what is the new code?anyone know that? -
@derun said in QNetworkAccessManager.setNetworkAccessible() is obsolete in Qt 5.15?:
in Qt 5.15, The following members(include setNetworkAccessible()) of class QNetworkAccessManager are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
But what is the new code?anyone know that?Hi, and welcome!
Can you please describe your use-case in more detail? What is your goal for calling
QNetworkAccessManager::setNetworkAccessible()
?The function was removed in Qt 6 and not replaced: https://doc.qt.io/qt-6/network-changes-qt6.html#bearer-management-is-removed
-
@JKSH When the system can access the LAN but cannot access the Internet, my http request in LAN will occurred an error "Network access is disabled",and i found call setNetworkAccessible(QNetworkAccessManager::UnknownAccessibility) can solve this problem.