Results 1 to 1 of 1

Thread: Cannot deserialize QWebHistory from QDataStream

  1. #1
    Join Date
    Feb 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Cannot deserialize QWebHistory from QDataStream

    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 :
    Qt Code:
    1. QDataStream stream(&file);
    2. file.open(QIODevice::ReadOnly);
    3. QWebView *dest = new QWebView;
    4. QWebHistory *history = dest->history();
    5. stream >> *(history);
    6. file.close();
    To copy to clipboard, switch view to plain text mode 
    But I got a SIGSEV
    and I've tried that :
    Qt Code:
    1. QDataStream stream(&file);
    2. file.open(QIODevice::ReadOnly);
    3. QWebView *dest = new QWebView;
    4. QWebHistory history = *(dest->history());
    5. stream >> history;
    6. file.close();
    To copy to clipboard, switch view to plain text mode 
    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
    Last edited by andryr; 13th February 2012 at 22:04.

Similar Threads

  1. Copy with QDataStream
    By wirasto in forum Qt Programming
    Replies: 11
    Last Post: 9th July 2009, 20:17
  2. QDataStream use
    By Doug Broadwell in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2007, 22:17
  3. Using QDataStream
    By toratora in forum Qt Programming
    Replies: 1
    Last Post: 2nd May 2007, 15:35
  4. QDataStream
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 23rd August 2006, 14:40
  5. QDataStream
    By frankoz in forum Qt Programming
    Replies: 1
    Last Post: 1st March 2006, 07:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.