[PyQt] QEvent.LeaveEditFocus

2012-08-03 Thread David Beck
I'm getting the following error message when trying to use "LeaveEditFocus" in an event filter (Python 3.3, Mac OS 10.7, PyQt 4.9.2): Traceback (most recent call last): File "/Users/David/Documents/Python/Qt/QtFieldbook/QtFieldbook/QtFieldbook/runFieldbook.py", line 53, in eventFilter if

Re: [PyQt] Using self.tr() with python string formatting

2012-08-03 Thread Vincent Vande Vyvre
On 03/08/12 12:55, Itay Brandes wrote: > right now for using self.tr () with python string > formatting, i do the following thing: > > unicode(self.tr ("%d out of %d completed")) % (i, n) > > is there a way to somehow combine the unicode & self.tr > ,

[PyQt] Using self.tr() with python string formatting

2012-08-03 Thread Itay Brandes
right now for using self.tr() with python string formatting, i do the following thing: unicode(self.tr("%d out of %d completed")) % (i, n) is there a way to somehow combine the unicode & self.tr, or make them look shorter? because calling unicode(self.tr()) on every shown string makes a lot of co