QNetworkConfiguration in ligtmap example
Unsolved
General and Desktop
-
Hi everyone. Im working on lightmap example in Qt, I didnt undersand the logic that i quote in the below. Can anybody explain me?
void MapZoom::sessionOpened()
{
// Save the used configuration
QNetworkConfiguration config = networkSession->configuration();
QString id;
if (config.type() == QNetworkConfiguration::UserChoice) {
id = networkSession->sessionProperty(
QLatin1String("UserChoiceConfiguration")).toString();
} else {
id = config.identifier();
}QSettings settings(QSettings::UserScope, QLatin1String("QtProject")); settings.beginGroup(QLatin1String("QtNetwork")); settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id); settings.endGroup();
}
-
@suslucoder What exactly don't you understand? QSettings part? Did you read its documentation?
-
And please use the code-tags to make your code readable!