I have a mainwindow, in it, I have a single QWebView.
I want to make a certain website (www.kdkdkkd.com for instance) cookies permanent, so each time a user closes and repopens the browser he doesnt need to log in again.
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to set your own “Cookie Jar”.
QNetworkAccessManager::setCookieJar.QNetworkCookieJar– as it doesn’t persist cookies by default when browser is closed:You can do this either by pushing to permanent storage on each
QNetworkCookieJar::setCookiesFromUrl(safest but slowest) or only when the browser window is closed (faster overall but less safe as if you exit abnormally cookie jar won’t be saved).Note that some cookies are not supposed to be persisted, you can use
QNetworkCookie::isSessionCookieto determine this.