简体   繁体   English

如何获得QNetworkConfiguration UserChoice对话框?

[英]How to get the QNetworkConfiguration UserChoice dialog?

Qt docu says I can get a popup for the user to choose the QNetworkConfiguration . Qt docu说我可以弹出一个窗口供用户选择QNetworkConfiguration But how can I do this? 但是我该怎么办呢?

When I have 当我有

QNetworkConfiguration config;
QNetworkSession *networkSession = new QNetworkSession(config, &a);
networkSession->open();

how can I tell it I want the dialog. 我该如何告诉我要对话。 There is not setType function or ctor. 没有setType函数或ctor。 What do I miss? 我想念什么? Or am I just on the wrong platform (Win64)? 还是我只是在错误的平台(Win64)上?

UserChoice The configuration is a placeholder which will be resolved to an actual configuration by the platform when a session is opened. UserChoice该配置是一个占位符,当会话打开时,平台会将其解析为实际配置。 Depending on the platform the selection may generate a popup dialog asking the user for his preferred choice. 根据平台的不同,选择可能会生成一个弹出对话框,询问用户他的首选选择。

根据http://doc.qt.io/qt-5/bearer-management.html,仅QNetworkConfigurationManager :: defaultConfiguration()返回UserChoice类型的配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM