[PyKDE] eric3 + MacOS X + qt designer.app

Detlev Offenbach detlev at die-offenbachs.de
Sat May 15 17:24:01 BST 2004


Am Samstag, 15. Mai 2004 15:07 schrieb Boris Gordon:
> On 15/05/2004, at 7:56 PM, Detlev Offenbach wrote:
> > Am Mittwoch, 12. Mai 2004 05:01 schrieb Boris Gordon:
> >> Greetings -
> >>
> >> I am very happy that eric3 is now running great on my mac but I
> >> would like to try to solve a problem with qt designer integration.
> >>
> >> How can I integrate qt designer ($QTDIR/bin/designer.app/ package
> >> on mac) with eric3 ?  I can create a shell script that launches
> >> designer using the open command but can't get anymore integration
> >> than this (ie when I double click on a form in a project it will
> >> launch designer but not open the form i clicked.  I can't seem to
> >> pass command line arguments to designer.app.
> >
> > Please try the following.
> >
> > In the File UI/UserInterface.py in the method "handleDesigner"
> > please add
> > the following lines after if statement testing for win32.
> >
> > elif sys.platform == "darwin":
> >     designer = designer + '.app'
> >
> > Maybe you have to adjust the second line. Unfortunately I am
> > unfamiliar with Mac OSX.
>
> On Mac OS X .app is an executable package (a directory) and the
> executable is somewhere within so the best solution seems to be just
> to put a shell script called designer in $QTDIR/bin/.
> Mine has the following :
>
> #!/bin/sh
> echo $@
> exec /Developer/qt/bin/designer.app/Contents/MacOS/designer $*
>
> Seems to work fine now.
> ---
> Boris Gordon

Why not try

	designer = designer + os.path.join('.app', 'Contents', 'MacOS', 
'designer')

instead of the a.m. second line. This would make it usable directly from 
within eric3. Can you please test it? If this works ok, I would like to 
include it for other tools as well.

Do the calls to Qt-Linguist, pyuic ('Compile Form'), pyupdate ('Generate 
translation') and lrelease ('Release translations') work ok on Mac OSX?

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list