PDA

View Full Version : Cannot deserialize QWebHistory from QDataStream



andryr
13th February 2012, 19:26
Hi,
I am coding a web browser using QtWebKit and i want to save the QWebHistory from my QWebView in a file. But i'm facing a problem : i can serialize QWebHistory in a file easily but i can't deserialize !
I've tried to proceed like that :

QDataStream stream(&file);
file.open(QIODevice::ReadOnly);
QWebView *dest = new QWebView;
QWebHistory *history = dest->history();
stream >> *(history);
file.close();
But I got a SIGSEV
and I've tried that :

QDataStream stream(&file);
file.open(QIODevice::ReadOnly);
QWebView *dest = new QWebView;
QWebHistory history = *(dest->history());
stream >> history;
file.close();
But here I got an error while compiling : QWebHistory::QWebHistory() is private
It seems like we can't deserialize QWebHistory but the documentation says that we can !
Thank ahead for your replies