PYQT 6:当设备连接/与Internet连接/断开连接时,是否有任何具有信号的类?

发布于 2025-01-28 23:35:44 字数 195 浏览 2 评论 0原文

我将下载功能添加到我正在创建的应用程序中。当下载过程中丢失了用户设备的Internet连接时,我希望下载一旦连接重新建立,我希望继续下载;当然,如果应用程序仍在运行。我该怎么做?看来曾经有一个qtnetwork.qnetworksession()。statechanged信号可以用于执行此操作,但在QT6中进行了弃用,我似乎找不到它的替代方法。

I'm adding a download function to an application that I'm creating. When the user's device's internet connection is lost during a download, I want the download to continue on once the connection is re-established; provided that the application is still running, of course. How can I do this? It appears that there used to be a QtNetwork.QNetworkSession().stateChanged signal that could be used to do this but it's deprecated in Qt6 and I can't seem to find an alternative to it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文