[Qt-interest] OS X app bundle doesn't start by double click, only from command line

Nikos Chantziaras realnc at arcor.de
Mon Apr 12 01:06:15 CEST 2010


On 04/12/2010 01:57 AM, Nikos Chantziaras wrote:
> This is probably me having no clue about OS X...
>
> I've build my application on OS X. When I start it from the terminal (by
> typing "./MyApp.app/Contents/MacOS/MyApp"), it works. It also works when
> I double click that binary file in the finder.
>
> However, when I double click the application bundle itself, nothing
> happens. What could be going wrong here?
>
> Using Qt 4.6.2.

I've been trying to debug this for the last hour, but found the solution 
5 minutes after sending this post :P

It was a problem with the main() arguments.  Double clicking the app 
bundle results in main() being called with argc == 2, even though 
there's only one argument in argv.  Why is that?



More information about the Qt-interest-old mailing list