[PyQt] SIP: Suggestions for a new major version

2011-04-13 Thread Jens Thoms Toerring
Hi,

   there are what I feel are a few rough edges to SIP were
I'd be very happy if a new major version would improve on
it.

One of these points is that SIP does balk at some legal C++
syntax. E.g. it doesn't want to understand types like 'long
int', it only accepts 'long' (same for 'short int').

And then SIP insists on the 'const' qualifier coming before
the type name and complains about "invalid syntax" when you
have it the other way round. E.g. it accepts 'const char *'
but not 'char const *'.

Our in-house coding standard requests using in C++ just the
forms that SIP doesn't like (the "type name first and const
qualifier afterwards" is straight from the C++ FAQ). So there
is quite a bit of menial work when converting C++ header files
into a .sip files that perhaps could be avoided.

Would it be a lot of work to make SIP accept alternative
(but legal) C++ syntax? I would be quite willing to spend
a bit of time on trying to get that implemented but I would
need some pointers to were to start looking since I haven't
spend a lot of time yet going through the SIP source code.

Another problem I have run into quite often is error messages
of the form

sip: xxx::yyy() has overloaded functions with the same Python signature

While I'm aware that Python's type system is quite different
from C++'s that always gives me a sinking feeling since I know
that finding the offending line(s) will cost me lots of time.
While I may have overlooked something in the documentation and
thus haven't yet groked the rules of what exactly are functions
"with the same Python signature" (I once thought I had got a
handle on it but then the next case squashed that hope;-), that
there are no line number in the error message to give me a star-
ting point on where to look also doesn't help too much;-) The
only way to find the offending lines I have at the moment is to
comment out lots of stuff in the .sip file, retry, uncomment a
few lines, try again etc. until SIP finally is satisfied. That
works but is rather time consuming and then I'm not really happy
when I don't understand what I'm doing and have to rely on trial-
and-error...
Best regards, Jens
-- 
  \   Jens Thoms Toerring    j...@toerring.de
   \___  http://toerring.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] How to disconnect all connected signals of an object

2011-04-13 Thread Phil Thompson
On Wed, 13 Apr 2011 19:20:22 +0200, Detlev Offenbach
 wrote:
> Hello,
> 
> what is the correct way to disconnect all signal connected to an object?
I 
> tried it with code like
> 
> browser.disconnect()
> 
> but that raises an exception
> 
> TypeError
> "arguments did not match any overloaded call:
QObject.disconnect(QObject, 
> SIGNAL(), QObject, SLOT()): not enough arguments
> QObject.disconnect(QObject, 
> SIGNAL(), callable): not enough arguments"
> 
> According to the Qt documentation that should work. Please note, that my
> code 
> uses new-style signal/slots.
> 
> Regards,
> Detlev

You can only disconnect all connections to a particular signal...

browser.signal.disconnect()

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


[PyQt] How to disconnect all connected signals of an object

2011-04-13 Thread Detlev Offenbach
Hello,

what is the correct way to disconnect all signal connected to an object? I 
tried it with code like

browser.disconnect()

but that raises an exception

TypeError
"arguments did not match any overloaded call: QObject.disconnect(QObject, 
SIGNAL(), QObject, SLOT()): not enough arguments QObject.disconnect(QObject, 
SIGNAL(), callable): not enough arguments"

According to the Qt documentation that should work. Please note, that my code 
uses new-style signal/slots.

Regards,
Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


pyqt@riverbankcomputing.com

2011-04-13 Thread Phil Thompson
On Wed, 13 Apr 2011 14:31:05 +0400, Anton Chikin 
wrote:
> Hello All,
> 
> I'm using PyQt version 4.8.3-2, shipped with Ubuntu 11.04 beta. While
> I was trying to use new multitouch testing function
> QTest::touchEvent() http://doc.qt.nokia.com/4.7/qtest.html#touchEvent
> I've come across the issue. This piece of code
> 
> from PyQt4 import QtTest
> def testMT(self):
>QtTest.QTest.touchEvent(self).press(0, QPoint(100,100))
> 
> causes
> 
> AttributeError: type object 'QTest' has no attribute 'touchEvent'
> 
> I discovered that this function is not listed in PyQt4 docs.
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtest.html
> 
> Could you please give me some guidelines to resolve this?
> Thank you!
> Anton Chikin.

Hmm - not sure how it got missed. It will be in tonight's snapshot.

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


pyqt@riverbankcomputing.com

2011-04-13 Thread Anton Chikin
Hello All,

I'm using PyQt version 4.8.3-2, shipped with Ubuntu 11.04 beta. While
I was trying to use new multitouch testing function
QTest::touchEvent() http://doc.qt.nokia.com/4.7/qtest.html#touchEvent
I've come across the issue. This piece of code

from PyQt4 import QtTest
def testMT(self):
   QtTest.QTest.touchEvent(self).press(0, QPoint(100,100))

causes

AttributeError: type object 'QTest' has no attribute 'touchEvent'

I discovered that this function is not listed in PyQt4 docs.
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtest.html

Could you please give me some guidelines to resolve this?
Thank you!
Anton Chikin.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] PyQt4 X64?

2011-04-13 Thread Jean-Claude Repetto

Le 13/04/2011 08:19, zhao_yunsong a écrit :

is there 64bit PyQt4?


Have you looked at the PyQt4 download page ?
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt