struct QmyLogin{ QString userName; QString password; UserAuthType userType;};
QList<QmyLogin> logins;... lpSettings->beginWriteArray("LOGINS"); for (int i = 0; i < logins.size(); ++i) { lpSettings->setArrayIndex(i); lpSettings->setValue("UserName", logins.at(i).userName); lpSettings->setValue("Password", logins.at(i).password); lpSettings->setValue("UserType", logins.at(i).userType); } lpSettings->endArray();