[PyQt] Overriding shouldInterruptJavaScript

2011-08-09 Thread Brian Zambrano
In my QWebPage, I'd like to override the shouldInterruptJavaScript method so
that it ignores long running javascript warning.

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html#shouldInterruptJavaScript

*Warning:* Because of binary compatibility constraints, this function is not
> virtual. If you want to provide your own implementation in a 
> QWebPage
>  subclass,
> reimplement the shouldInterruptJavaScript() slot in your subclass instead.
> QtWebKit
>  will
> dynamically detect the slot and call it.


However, when I override it, it appears to never be called.

class DebugWebPage(QWebPage):

@pyqtSlot(bool)
def shouldInterruptJavaScript(self):
print 'not interrupting'
return False

It looks like someone else hit the same issue with PySide:

http://stackoverflow.com/questions/6868286/override-shouldinterruptjavascript-in-qwebpage-with-pyside

I'm tried with and without the pyqtSlot decorator with the same results.

Insight appreciated,
BZ
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] QTableWidget.scrollToItem behaviors on Mac OS X Lion

2011-08-09 Thread Virgil Dupras
On 2011-08-09, at 2:48 AM, zw g wrote:

> Can someone help me?
> Thanks in advance.
> 
> Gui
> 
> 
> On Mon, Aug 8, 2011 at 9:57 PM, zw g  wrote:
> Oh, sorry, i forgot sth.
> I execute my app from the command line. (Terminal of Mac OS X Lion)
> 
> Here is some information i found during my app runing:
> 
> 
> 2011-08-08 21:34:30.928 Python[32886:100b] -_continuousScroll is deprecated 
> for NSScrollWheel. Please use -hasPreciseScrollingDeltas.
> 2011-08-08 21:34:30.929 Python[32886:100b] -deviceDeltaX is deprecated for 
> NSScrollWheel. Please use -scrollingDeltaX.
> 2011-08-08 21:34:30.929 Python[32886:100b] -deviceDeltaY is deprecated for 
> NSScrollWheel. Please use -scrollingDeltaY.
> 
> Hope that helps.
> 
> 
> Gui
> 
> 
> 
> On Mon, Aug 8, 2011 at 9:54 PM, zw g  wrote:
> Dear List,
> 
> 
> I'm a newbie of PyQt, i am learning it recently.
> 
> QTableWidget's scrollToItem() method seems not work correctly on Mac OS X 
> lion. (I guess)
> After i set the currentItem by setCurrentItem() method, then i invoke the 
> scrollToItem(myCurrentItem(), 3)
> 
> self.obj.setCurrentItem(self.obj.item(row, column))
> self.obj.scrollToItem(self.obj.currentItem(), 3)  # The second 
> argument could be 0, 1, 2 or 3.
> 
> It just highlight the current item of the row. (Which was the right action)
> But i also want it to scroll to the row if that row wasn't in the viewpoint. 
> (For example, if i drag down the side slide bar to some other page and the 
> current item of the row was not on my screen.)
> 
> It is a bug or just i use the wrong method?
> Some one help me? 
> 
> Thanks in advance.
> 
> 
> Gui

I don't think that Qt supports OS X Lion yet, you'll have to wait for 4.8 I 
guess.

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


Re: [PyQt] Help needed with SIP

2011-08-09 Thread Hans-Peter Jansen
On Sunday 07 August 2011, 15:29:59 Vipul Raheja wrote:
> Hi,
>
> Thanks for your replies, Pete and Phil, I was able to fix the issues
> and build PyQt on my system by doing a few rebuilds with changes in
> them. I had earlier installed sip and PyQt using apt-get, but later I
> did the same by directly building the sources, and it worked.
>
> However, now I am facing a different issue. I was able to create a
> .so file by executing configure.oy with python and doing a make and
> make install, however, when I do an import of the library in python
> console, it gives me this error: http://paste.debian.net/125358/ (I
> hope paste.debian is fine, if not, kindly suggest an alternate way)

Hard to say, what's going on. I guess, it cannot locate the ossim.so 
lib, at least not the version, that you linked to.

Maybe, it's just missing a call to ldconfig.

Try to check the python site libs with ldd, and compare with the build 
logs.

If that stuff is publically available somewhere, please provide a 
detailed description on what you did, which versions, etc., and I might 
try to reproduce your issue in a couple of days..

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