[PyQt] QWebHistory load/save
Russell Valentine
russ at coldstonelabs.org
Mon Mar 15 17:39:56 GMT 2010
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.
Qt: 4.5.3
PyQt4: 4.7
Python: 2.6.4
=================
from PyQt4 import QtCore, QtGui, QtWebKit
import sys
app = QtGui.QApplication(sys.argv)
f=QtCore.QFile("history.file")
d=QtCore.QDataStream(f)
page=QtWebKit.QWebPage()
page.mainFrame().load(QtCore.QUrl("http://python.org"))
d.__lshift__(page.history())
David Bronke wrote:
> Sorry, I spoke to soon. Using out.__lshift__(view.page().history()) yeilds a
> zero-length file. Attached is another somewhat minimal test case; it loads
> google, wikipedia, and CNN one after the other, and when CNN is loaded, it
> saves the web view's history to a file and checks the file's length. On my
> machine, this invariably comes out to 0 bytes.
>
> Qt version: 4.6.1
> PyQt4 version: 4.7.1-snapshot-20100120 (I couldn't get anything but the
> snapshot to install correctly)
> Python version: 2.6.4
> OS: Arch Linux
>
> Should I update to the latest snapshot and see if that fixes anything?
More information about the PyQt
mailing list