Re: [PyQt] Translating ui files with gettext

2008-09-17 Thread Albert Cervera i Areny
A Dimecres 17 Setembre 2008, Albert Cervera i Areny va escriure: > I'd like to use gettext for translating strings in .ui files, are there any > tricks one can use to do that if they are loaded dynamically "loadUi()"? > > It seems that in C++ there's a the '-tr' parameter in 'uic' and I see no > eq

[PyQt] Re: Bug in QString comparison

2008-09-17 Thread Giovanni Bajo
On mar, 2008-09-16 at 21:54 +0100, Phil Thompson wrote: > On Wed, 10 Sep 2008 01:51:54 +0200, Giovanni Bajo <[EMAIL PROTECTED]> > wrote: > > Hello Phil, > > > > this looks weird to me (using sip 4.7.6, PyQt 4.4.2, Qt 4.4.0): > > > > === > > $ python > > Python

[PyQt] pyuic bug?

2008-09-17 Thread Detlev Offenbach
Hi, I think pyuic of recent snapshot has a bug. I have a form with a QTreeWidget. This widget has some columns where the last column has an empty title. Older pyuic generated this line of code. self.findList.headerItem().setText(3,"") Newer pyuic don't generate this. The example Ui file is att

Re: [PyQt] Documenting signals

2008-09-17 Thread Detlev Offenbach
On Mittwoch, 17. September 2008, Georg Altmann wrote: > Hi, > > I'm new to PyQt(4) and python in general. Is there a good way to > document signals of a class in the doc string? > > Something like this: > > class MyClass(QObject): > """My nifty class. > > @signal myNiftySignal() This sign

[PyQt] catching exceptions and PyQt

2008-09-17 Thread inhahe
I would like to capture any error that happen in an app using PyQt I tried this: while 1: try: app.processEvents() except: do stuff here with sys.exc_info() but it doesn't quite work, i guess because of PyQt handling events in other threads. so my question is.. how do I capture all

[PyQt] Re: Troubles with PYQT.

2008-09-17 Thread Georg Altmann
Min Li schrieb: Hi everyone. I have some trouble to retrieval the selected text in the QTextEdit. I mean I want use mouse to select the text in the QTextEdit, and retrieval it in a local variable. Say your QTextEdit is te: str = te.textCursor().selectedText() Now str contains a QString with

Re: [PyQt] Documenting signals

2008-09-17 Thread Phil Thompson
On Wed, 17 Sep 2008 12:07:29 +0200, Georg Altmann <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to PyQt(4) and python in general. Is there a good way to > document signals of a class in the doc string? > > Something like this: > > class MyClass(QObject): > """My nifty class. > > @sign

[PyQt] Documenting signals

2008-09-17 Thread Georg Altmann
Hi, I'm new to PyQt(4) and python in general. Is there a good way to document signals of a class in the doc string? Something like this: class MyClass(QObject): """My nifty class. @signal myNiftySignal() This signal will be emitted when the object did something nifty.""" Or can

[PyQt] Troubles with PYQT.

2008-09-17 Thread Min Li
Hi everyone. I have some trouble to retrieval the selected text in the QTextEdit. I mean I want use mouse to select the text in the QTextEdit, and retrieval it in a local variable. Is there any on can help me? Thanks a lot. ___ PyQt mailing listPyQt

Re: [PyQt] SIP syntax error with enum or namespace

2008-09-17 Thread Phil Thompson
On Tue, 16 Sep 2008 16:53:53 -0700, "Mark A. Schmucker" <[EMAIL PROTECTED]> wrote: > According to the SIP doc, 6.1 Syntax Definition, a "class-statement" can be > a class, enum, namespace, or a few other things. I can successfully > specify > a class, but not an enum or namespace. > > These are