Well, according to the Qt docs, the << and >> operators for QWebHistory were added in Qt 4.6, which would explain why it's just giving you NotImplemented under Qt 4.5.3... I'm not seeing that output here, though, and I'm still getting a zero-length file. (with your test script as well)<div>
<br></div><div><br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 12:39, Russell Valentine <span dir="ltr"><<a href="mailto:russ@coldstonelabs.org">russ@coldstonelabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Looks like your on to something unless I did something wrong as well. I wrote a little simple case. Using .__lshift__ instead of "<<" just made it not have an exception but it shows as "NotImplemented" in the console.<br>
<br>
Qt: 4.5.3<br>
PyQt4: 4.7<br>
Python: 2.6.4<br>
=================<br>
<br>
from PyQt4 import QtCore, QtGui, QtWebKit<br>
import sys<br>
<br>
app = QtGui.QApplication(sys.argv)<br>
<br>
f=QtCore.QFile("history.file")<br>
d=QtCore.QDataStream(f)<br>
page=QtWebKit.QWebPage()<br>
page.mainFrame().load(QtCore.QUrl("<a href="http://python.org" target="_blank">http://python.org</a>"))<br>
<br>
d.__lshift__(page.history())<div><div></div><div class="h5"><br>
<br>
<br>
<br>
David Bronke wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, I spoke to soon. Using out.__lshift__(view.page().history()) yeilds a<br>
zero-length file. Attached is another somewhat minimal test case; it loads<br>
google, wikipedia, and CNN one after the other, and when CNN is loaded, it<br>
saves the web view's history to a file and checks the file's length. On my<br>
machine, this invariably comes out to 0 bytes.<br>
<br>
Qt version: 4.6.1<br>
PyQt4 version: 4.7.1-snapshot-20100120 (I couldn't get anything but the<br>
snapshot to install correctly)<br>
Python version: 2.6.4<br>
OS: Arch Linux<br>
<br>
Should I update to the latest snapshot and see if that fixes anything?<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>