PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 838 - module "QtWebKit" is not installed ( import QtWebKit 1.0 in QML-file )
: module "QtWebKit" is not installed ( import QtWebKit 1.0 in QML-file )
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: Windows Installer
: 1.0.1
: PC MS Windows XP/Vista/7
: P3 normal
Assigned To: Roman Lacko
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-25 10:08 EEST by Mikhail
Modified: 2011-04-29 18:06 EEST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail 2011-04-25 10:08:41 EEST
PySide-1.0.0qt472.win32-py2.6

(Win7 64bit)

test.qml
------
import QtQuick 1.0
import QtWebKit 1.0

Rectangle {
    width: 100
    height: 62

    WebView {
        id: web_view1
        anchors.fill: parent
        url: "qrc:/qtquickplugin/html/welcome.html"
    }
}


test.py
------
import sys
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtDeclarative import *
from PySide.QtWebKit import *

class MainWindow(QDeclarativeView):

    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)

        self.setSource(QUrl.fromLocalFile('test.qml'))

        self.setWindowTitle("Main Window")
        self.rContext = self.rootContext()
        self.rContext.setContextProperty('pyApp', self)
        self.rObject = self.rootObject()

if __name__ == '__main__':

    app = QApplication(sys.argv)

    window = MainWindow()
    window.show()

    sys.exit(app.exec_())        

-------

run:
-------

file:///Z:/Projects/Test/src/test.qml:2:1: module "QtWebKit" is not installed 
     import QtWebKit 1.0

     ^ 

-------

See http://developer.qt.nokia.com/forums/viewthread/4981/
Comment 1 renato filho 2011-04-25 15:54:09 EEST
check if you have installed the necessary files to use QML QtWebKit module.
In Ububuntu natty the package libqtwebkit4-declarative solve the problem.
Comment 2 Mikhail 2011-04-25 16:55:08 EEST
I have Windows 7 (64 bit)
Installed:  
Python 2.6 (Portable, but PATH setup correct)
PySide 1.0.0 for Windows (PySide-1.0.0qt472.win32-py2.6)
QT SDK 1.1 (updated 2011.04.25)

QML-file (test.qml) create normal on Qt Creator, but if i run or build to .exe 
test.py file i have this error message in Python IDE (Eclipse)

In my PySide directory
(Z:\Portable\Soft\Development\PortablePython_1.1_py2.6.1\App\Lib\site-packages\PySide\)
i have next files:

plugins\
scripts\
private.pyo
__init__.pyo
QtXmlPatterns.pyd
QtXml.pyd
QtWebKit.pyd
QtUiTools.pyd
QtTest.pyd
QtSvg.pyd
QtSql.pyd
QtScriptTools.pyd
QtScript.pyd
QtOpenGL.pyd
QtNetwork.pyd
QtMultimedia.pyd
QtHelp.pyd
QtGui.pyd
QtDeclarative.pyd
QtCore.pyd
phonon.pyd
private.pyc
__init__.pyc
private.py
__init__.py
pyside-rcc.exe
pyside-lupdate.exe
shiboken-python2.6.dll
shiboken.dll
QtXmlPatterns4.dll
QtXml4.dll
QtWebKit4.dll
QtTest4.dll
QtSvg4.dll
QtSql4.dll
QtScriptTools4.dll
QtScript4.dll
QtOpenGL4.dll
QtNetwork4.dll
QtMultimedia4.dll
QtHelp4.dll
QtGui4.dll
QtDesignerComponents4.dll
QtDesigner4.dll
QtDeclarative4.dll
QtCore4.dll
QtCLucene4.dll
Qt3Support4.dll
pyside-python2.6.dll
pyside.dll
phonon4.dll


Other PySide functional (QML without "import QtWebKit 1.0" directive) works
fine.
Comment 3 renato filho 2011-04-25 17:23:15 EEST
Chek you QT SDK DIR for the dir called "imports", then try export the 
"QML_IMPORT_PATH" to this directory.
Comment 4 Mikhail 2011-04-26 11:23:38 EEST
test.qml:
-----------
import Qt 4.7
import
"/Portable/Soft/Development/Qt/1.1beta/Desktop/Qt/4.7.3/mingw/imports/QtWebKit"
-----------

run
-----------
file:///Z:/Projects/Test/src/test.qml:2:1: plugin cannot be loaded for module
".Portable.Soft.Development.Qt.1.1beta.Desktop.Qt.4.7.3.mingw.imports.QtWebKit":
The plugin
'Z:/Portable/Soft/Development/Qt/1.1beta/Desktop/Qt/4.7.3/mingw/imports/QtWebKit/qmlwebkitplugin.dll'
uses incompatible Qt library. Expected build key "Windows msvc release
full-config", got "Windows mingw release full-config" 
     import
"/Portable/Soft/Development/Qt/1.1beta/Desktop/Qt/4.7.3/mingw/imports/QtWebKit"

     ^ 
-----------


test.qml:
-----------
import Qt 4.7
import import "/Portable/Soft/Development/Qt/1.1beta/QtCreator/bin/QtWebKit"
-----------

run in PythonIDE works fine, but no in QT Criator
Comment 5 Mikhail 2011-04-26 11:29:59 EEST
test.qml:
-----------
import Qt 4.7
import "/Portable/Soft/Development/Qt/1.1beta/QtCreator/bin/QtWebKit"
-----------
Comment 6 renato filho 2011-04-26 17:31:23 EEST
fixed on package script. Could you test the last nightly build package?
http://www.pyside.org/files/nightly/PySide-1.0.0.20110426qt471.win32-py2.7.exe
Comment 7 Hugo Parente Lima 2011-04-26 17:33:30 EEST
Changing component to "Windows installer".
Comment 8 Mikhail 2011-04-26 18:26:55 EEST
I install Python 2.7
and PySide-1.0.0.20110426qt471.win32-py2.7.exe
I'm sorry, but nothing changed

and  PySide-1.0.1qt472.win32-py2.7.exe  too :(
Comment 9 Hugo Parente Lima 2011-04-27 23:26:44 EEST
Reopening the bug as the issue still not resolved.
Comment 10 Hugo Parente Lima 2011-04-27 23:26:57 EEST
*** Bug 842 has been marked as a duplicate of this bug. ***
Comment 11 renato filho 2011-04-28 00:07:50 EEST
tested with:

2aa8545a87a35ee60570712f01e2fe04  PySide-1.0.1qt472.win32-py2.7.exe

and everything works file.

Could you confirm that?
Comment 12 Mikhail 2011-04-28 08:37:44 EEST
In Python IDE everything works file (thank you very much for the excellent
work). But if build in .exe file (by cx_Freeze or py2exe) these .py + .qml
files and run this, i have same error.

tested with:
2aa8545a87a35ee60570712f01e2fe04 PySide-1.0.1qt472.win32-py2.7.exe
cee2323616070bd7f4e6c088df0c2f74 PySide-1.0.1qt472.win32-py2.6.exe
Comment 13 Roman Lacko 2011-04-28 10:45:00 EEST
This is not bug of official Windows Installer. If yor code works after
installing PySide into "system" with windows installer than installer is OK. If
yor code does not work after "packaging" and installing PySide into "system"
with cx_Freeze, than the bug is in cx_Freeze. Sorri, I have never used
cx_Freeze to distribute my applications, I can not help here, but maybe someone
on mailing list ?
Regards
-Roman
Comment 14 Mikhail 2011-04-28 12:38:34 EEST
Yes, I understand.
Maybe not all dependencies are copied when building.
Now I copied the folders \Qt\1.1beta\QtCreator\bin\QtWebKit\ in built folder
and it worked...

Ok. I will find other ways...
Thank you for your help!


PS:  Sorry for my little english. I am from Russia. :)
Comment 15 Hugo Parente Lima 2011-04-28 16:31:31 EEST
Marking as fixed, sorry Roman, I should not have reopened this bug as it's
really fixed.

Thanks.
Comment 16 Hugo Parente Lima 2011-04-28 16:33:32 EEST
Btw, Roman, did you push your scripts changes into the git repository?
Send a email to me if you don't have permission to push into packaging
repository.
Comment 17 Roman Lacko 2011-04-29 10:12:15 EEST
Hi Hugo,
I created the merge request:
https://qt.gitorious.org/pyside/packaging/merge_requests/10

Regards
Comment 18 renato filho 2011-04-29 18:06:04 EEST
PySide release 1.0.2