Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
5.9.1, 5.9.2, 5.10.0 Beta 2
-
None
Description
Hello, found interest trouble, when i open some page:
// code placeholder MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); web_view = new QWebEngineView(this); web_view->setContextMenuPolicy( Qt::NoContextMenu); WebPage *pg = new WebPage(); QWebEngineProfile *profile = QWebEngineProfile::defaultProfile(); profile->setCachePath("/tmp/arm"); profile->setPersistentStoragePath("/tmp/arm"); QWebEngineSettings *ws = QWebEngineSettings::defaultSettings(); pg->settings()->setAttribute(QWebEngineSettings::WebGLEnabled, true); pg->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); pg->settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true); pg->settings()->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, true); pg->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true); pg->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true); pg->settings()->setAttribute(QWebEngineSettings::AutoLoadImages,true); web_view->setPage(pg); web_view->load(QUrl("http://mysite.ru")); setCentralWidget(web_view); }
and in javasript try save localstorage
// code placeholder <script> if(localStorage.getItem("login") == null) { localStorage.setItem("login","test"); } </script>
value in localStorage not overwrite or saved 2 symbol, or clear full, but not save normally value in localStorage. Tell me please maybe im do some wrong?