[PyQt] issues with webkit javascript interaction

2010-11-28 Thread Hans-Peter Jansen
Hi Phil,

here's the next issue, this time related to webkit javascript 
interaction. The code is ported from Qt's webkit/formextractor example.

It tries to make use of addToJavaScriptWindowObject(), which should be 
allow to interact with javascript code. Unfortunately, triggering 
submit, which should result in a call to FormExtractor.submit() isn't 
executed at all.

python: 2.6
sip: 4.12-snapshot-ca22b358ab05
qt4: 4.7.1
pyqt4: snapshot-4.8.2-a935ffc263c2

Pete


formextractor.py
Description: application/python


formextractor.ui
Description: application/designer

PYUIC = pyuic4
PYRCC = pyrcc4

UIFILES = $(wildcard *.ui)
PYUIFILES = $(patsubst %.ui,ui_%.py,$(UIFILES))

RESOURCES = $(wildcard *.qrc)
PYRESOURCES = $(patsubst %.qrc,%_rc.py,$(RESOURCES))

ui_%.py: %.ui
	$(PYUIC) -x -o $@ $

%_rc.py: %.qrc
	$(PYRCC) -o $@ $

all: $(PYUIFILES) $(PYRESOURCES)

$(PYUIFILES): $(UIFILES)

$(PYRESOURCES): $(RESOURCES)
!DOCTYPE RCCRCC version=1.0
 qresource
 fileform.html/file
 /qresource
 /RCC

The Green People Book Club



Welcome to The Green People Book Club. Please register to obtain a membership with us.





First name:







Last name:







Gender:


 Male
 Female





Check here if you would like to receive regular updates from us:







___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] issues with webkit javascript interaction

2010-11-28 Thread Phil Thompson
On Sun, 28 Nov 2010 13:15:15 +0100, Hans-Peter Jansen h...@urpla.net
wrote:
 Hi Phil,
 
 here's the next issue, this time related to webkit javascript 
 interaction. The code is ported from Qt's webkit/formextractor example.
 
 It tries to make use of addToJavaScriptWindowObject(), which should be 
 allow to interact with javascript code. Unfortunately, triggering 
 submit, which should result in a call to FormExtractor.submit() isn't 
 executed at all.
 
 python: 2.6
 sip: 4.12-snapshot-ca22b358ab05
 qt4: 4.7.1
 pyqt4: snapshot-4.8.2-a935ffc263c2
 
 Pete

You just need to decorate submit() with pyqtSlot().

It will be in tonight's snapshot.

Thanks,
Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt