Re: [PyQt] Gesture programming in PyQt

2012-01-10 Thread Phil Thompson
On Tue, 10 Jan 2012 19:28:09 +0100, Detlev Offenbach
 wrote:
> Am Montag, 9. Januar 2012, 22:17:45 schrieb Phil Thompson:
>> On Mon, 09 Jan 2012 19:11:18 +0100, Detlev Offenbach
>> 
>>  wrote:
>> > Am Montag, 9. Januar 2012, 09:58:39 schrieb Phil Thompson:
>> >> On Sun, 08 Jan 2012 18:05:52 +0100, Detlev Offenbach
>> >> 
>> >>  wrote:
>> >> > Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
>> >> >> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
>> >> >> 
>> >> >>  wrote:
>> >> >> > Hi Phil,
>> >> >> > 
>> >> >> > can you test my little test script on your side? I tried it
>> >> >> > over
>> >> >> > here
>> >> >> 
>> >> >> with
>> >> >> 
>> >> >> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
>> >> >> 
>> >> >> What is it supposed to do?
>> >> >> 
>> >> >> Phil
>> >> > 
>> >> > I used it to get some know how in gesture programming. The custom
>> >> 
>> >> gesture
>> >> 
>> >> > should register swipes using the touchpad of e.g. a MacBook. I
>> 
>> couldn't
>> 
>> >> > get it
>> >> > working because it crashed when the custome gesture recognizer is
>> >> > registered.
>> >> > The script itself doesn't do anything useful except printing some
>> 
>> info
>> 
>> >> > about
>> >> > the gesture being handled.
>> >> 
>> >> So what do I have to do to test it?
>> > 
>> > Just start it and perform some swipes on the touchpad. As I said, for
>> > me
>> > it
>> > even failed starting up.
>> 
>> What touchpad?
> 
> E.g. the touchpad of a MacBook.

I know ;), but if you could see my development environment you would
notice a complete absence of touchpads.

>> For me it starts up and displays the "Testing Gestures" text. I quit it
>> with the close button.
> 
> That means, I have to check my installation. What versions did you test
it 
> with (Qt, PyQt4)?

Current snapshots (including the fix to QGestureRecognizer.create()) and
Qt v4.8.

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


Re: [PyQt] Gesture programming in PyQt

2012-01-10 Thread Detlev Offenbach
Am Montag, 9. Januar 2012, 22:17:45 schrieb Phil Thompson:
> On Mon, 09 Jan 2012 19:11:18 +0100, Detlev Offenbach
> 
>  wrote:
> > Am Montag, 9. Januar 2012, 09:58:39 schrieb Phil Thompson:
> >> On Sun, 08 Jan 2012 18:05:52 +0100, Detlev Offenbach
> >> 
> >>  wrote:
> >> > Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
> >> >> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
> >> >> 
> >> >>  wrote:
> >> >> > Hi Phil,
> >> >> > 
> >> >> > can you test my little test script on your side? I tried it
> >> >> > over
> >> >> > here
> >> >> 
> >> >> with
> >> >> 
> >> >> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
> >> >> 
> >> >> What is it supposed to do?
> >> >> 
> >> >> Phil
> >> > 
> >> > I used it to get some know how in gesture programming. The custom
> >> 
> >> gesture
> >> 
> >> > should register swipes using the touchpad of e.g. a MacBook. I
> 
> couldn't
> 
> >> > get it
> >> > working because it crashed when the custome gesture recognizer is
> >> > registered.
> >> > The script itself doesn't do anything useful except printing some
> 
> info
> 
> >> > about
> >> > the gesture being handled.
> >> 
> >> So what do I have to do to test it?
> > 
> > Just start it and perform some swipes on the touchpad. As I said, for me
> > it
> > even failed starting up.
> 
> What touchpad?

E.g. the touchpad of a MacBook.

> 
> For me it starts up and displays the "Testing Gestures" text. I quit it
> with the close button.

That means, I have to check my installation. What versions did you test it 
with (Qt, PyQt4)?

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


Re: [PyQt] Gesture programming in PyQt

2012-01-09 Thread Phil Thompson
On Mon, 09 Jan 2012 19:11:18 +0100, Detlev Offenbach
 wrote:
> Am Montag, 9. Januar 2012, 09:58:39 schrieb Phil Thompson:
>> On Sun, 08 Jan 2012 18:05:52 +0100, Detlev Offenbach
>> 
>>  wrote:
>> > Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
>> >> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
>> >> 
>> >>  wrote:
>> >> > Hi Phil,
>> >> > 
>> >> > can you test my little test script on your side? I tried it over
>> >> > here
>> >> 
>> >> with
>> >> 
>> >> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
>> >> 
>> >> What is it supposed to do?
>> >> 
>> >> Phil
>> > 
>> > I used it to get some know how in gesture programming. The custom
>> 
>> gesture
>> 
>> > should register swipes using the touchpad of e.g. a MacBook. I
couldn't
>> > get it
>> > working because it crashed when the custome gesture recognizer is
>> > registered.
>> > The script itself doesn't do anything useful except printing some
info
>> > about
>> > the gesture being handled.
>> 
>> So what do I have to do to test it?
>> 
> 
> Just start it and perform some swipes on the touchpad. As I said, for me
> it 
> even failed starting up.

What touchpad?

For me it starts up and displays the "Testing Gestures" text. I quit it
with the close button.

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


Re: [PyQt] Gesture programming in PyQt

2012-01-09 Thread Detlev Offenbach
Am Montag, 9. Januar 2012, 09:58:39 schrieb Phil Thompson:
> On Sun, 08 Jan 2012 18:05:52 +0100, Detlev Offenbach
> 
>  wrote:
> > Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
> >> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
> >> 
> >>  wrote:
> >> > Hi Phil,
> >> > 
> >> > can you test my little test script on your side? I tried it over
> >> > here
> >> 
> >> with
> >> 
> >> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
> >> 
> >> What is it supposed to do?
> >> 
> >> Phil
> > 
> > I used it to get some know how in gesture programming. The custom
> 
> gesture
> 
> > should register swipes using the touchpad of e.g. a MacBook. I couldn't
> > get it
> > working because it crashed when the custome gesture recognizer is
> > registered.
> > The script itself doesn't do anything useful except printing some info
> > about
> > the gesture being handled.
> 
> So what do I have to do to test it?
> 

Just start it and perform some swipes on the touchpad. As I said, for me it 
even failed starting up.

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


Re: [PyQt] Gesture programming in PyQt

2012-01-09 Thread Phil Thompson
On Sun, 08 Jan 2012 18:05:52 +0100, Detlev Offenbach
 wrote:
> Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
>> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
>> 
>>  wrote:
>> > Hi Phil,
>> > 
>> > can you test my little test script on your side? I tried it over here
>> 
>> with
>> 
>> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
>> 
>> What is it supposed to do?
>> 
>> Phil
> 
> I used it to get some know how in gesture programming. The custom
gesture 
> should register swipes using the touchpad of e.g. a MacBook. I couldn't
> get it 
> working because it crashed when the custome gesture recognizer is
> registered. 
> The script itself doesn't do anything useful except printing some info
> about 
> the gesture being handled.

So what do I have to do to test it?

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


Re: [PyQt] Gesture programming in PyQt

2012-01-08 Thread Detlev Offenbach
Am Samstag, 7. Januar 2012, 18:31:16 schrieb Phil Thompson:
> On Sat, 7 Jan 2012 15:33:08 +0100, Detlev Offenbach
> 
>  wrote:
> > Hi Phil,
> > 
> > can you test my little test script on your side? I tried it over here
> 
> with
> 
> > Python 3.2.2, Qt 4.7.4 and latest released sip/PyQt.
> 
> What is it supposed to do?
> 
> Phil

I used it to get some know how in gesture programming. The custom gesture 
should register swipes using the touchpad of e.g. a MacBook. I couldn't get it 
working because it crashed when the custome gesture recognizer is registered. 
The script itself doesn't do anything useful except printing some info about 
the gesture being handled.

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


Re: [PyQt] Gesture programming in PyQt

2012-01-05 Thread Detlev Offenbach

Am 04.01.2012 um 20:04 schrieb Phil Thompson:

> On Wed, 4 Jan 2012 19:46:45 +0100, Detlev Offenbach
>  wrote:
>> Hello,
>> 
>> does anybody have experience in gesture programming with PyQt? I am
> trying
>> to program a custom gesture recognizer, but registering it with
>> QGestureRecognizer.registerRecognizer(…) crashes the script. Here is the
>> excerpt of the code that is executing the above function.
>> 
>> --CODE--
>> class E5SwipeGestureRecognizer(QGestureRecognizer):
>>   __type = 0
>>   __instance = None
>> 
>>   def __init__(self):
>>   super().__init__()
>> 
>>   @classmethod
>>   def gestureType(cls):
>>   if cls.__instance is None:
>>   cls.__instance = E5SwipeGestureRecognizer()
>>   cls.__type =
>>   QGestureRecognizer.registerRecognizer(cls.__instance)   # this 
>> segfaults the app
>>   return cls.__type
>> --END CODE--
> 
> Hmm - the /Transfer/ annotation on QGestureRecognizer.create() looks
> wrong. Try changing it to /Factory/.


That might be a second issue. So far my code didn't even get there. The call to 
register my gesture recognizer already crashes the application (see above). 
That is long before the recognizer is asked to create a new gesture object.

Regards
Detlev

Detlev Offenbach
det...@die-offenbachs.de





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Gesture programming in PyQt

2012-01-04 Thread Phil Thompson
On Wed, 4 Jan 2012 19:46:45 +0100, Detlev Offenbach
 wrote:
> Hello,
> 
> does anybody have experience in gesture programming with PyQt? I am
trying
> to program a custom gesture recognizer, but registering it with
> QGestureRecognizer.registerRecognizer(…) crashes the script. Here is the
> excerpt of the code that is executing the above function.
> 
> --CODE--
> class E5SwipeGestureRecognizer(QGestureRecognizer):
>__type = 0
>__instance = None
> 
>def __init__(self):
>super().__init__()
> 
>@classmethod
>def gestureType(cls):
>if cls.__instance is None:
>cls.__instance = E5SwipeGestureRecognizer()
>cls.__type =
>QGestureRecognizer.registerRecognizer(cls.__instance)
>return cls.__type
> --END CODE--

Hmm - the /Transfer/ annotation on QGestureRecognizer.create() looks
wrong. Try changing it to /Factory/.

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

[PyQt] Gesture programming in PyQt

2012-01-04 Thread Detlev Offenbach
Hello,

does anybody have experience in gesture programming with PyQt? I am trying to 
program a custom gesture recognizer, but registering it with 
QGestureRecognizer.registerRecognizer(…) crashes the script. Here is the 
excerpt of the code that is executing the above function.

--CODE--
class E5SwipeGestureRecognizer(QGestureRecognizer):
   __type = 0
   __instance = None

   def __init__(self):
   super().__init__()

   @classmethod
   def gestureType(cls):
   if cls.__instance is None:
   cls.__instance = E5SwipeGestureRecognizer()
   cls.__type = QGestureRecognizer.registerRecognizer(cls.__instance)
   return cls.__type
--END CODE--


Regards,
Detlev


Detlev Offenbach
det...@die-offenbachs.de





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt