Hi,

After an update of QtWebKit on ArchLinux, I've a strange behaviour with
the QWebView.

When I set an url, only the basename of the url is setted and nothing
appears in the viewer.

On Ubuntu 10.04 no problem, works fine:

vincent@tiemoko:~/Qmap$ python map.py
QtWebKit vers:  532.4
Url:  PyQt4.QtCore.QUrl(u'file:///home/vincent/Qmap/OSmapViewer.html')


On ArchLinux updated with qtwebkit 2.2.1-2 x86_64:

[vincent@myhost Qmap]$ python2 map.py
QtWebKit vers:  534.34
Url:  PyQt4.QtCore.QUrl(u'file:///home/vincent/Qmap')

=====================================================
# -*- coding: utf-8 -*-

import sys

from PyQt4 import QtCore, QtGui, QtWebKit
print "QtWebKit vers: ", QtWebKit.qWebKitVersion()

class MiniView(object):
    def setupUi(self, MainWindow):
        MainWindow.resize(400, 300)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.webView = QtWebKit.QWebView(self.centralwidget)
        self.gridLayout.addWidget(self.webView, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        MainWindow.show()
        QtCore.QCoreApplication.processEvents()

        self.page = QtWebKit.QWebPage()
        self.webView.setPage(self.page)
       
        self.osm_url = QtCore.QUrl("/home/vincent/Qmap/OSmapViewer.html")
        self.webView.setUrl(self.osm_url)
        print "Url: ", self.webView.url()

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    MainWindow = QtGui.QMainWindow()
    ui = MiniView()
    ui.setupUi(MainWindow)
    sys.exit(app.exec_())
===========================================================

Thanks for all advices.
--
Vincent V.V.
Oqapy . Qarte+7 . PaQager
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to