[Pythonmac-SIG] py2app + pyqt: Differences between command-line and double-click

Michael McCracken michael.mccracken at gmail.com
Wed May 15 23:50:44 CEST 2013


There aren't any other window-focus related gotchas that I know of in the
bootstrap code, and I've looked at most of it - can you share more about
your program, and perhaps show what your setup.py looks like?



On Wed, May 15, 2013 at 2:31 PM, Berg, Stuart <bergs at janelia.hhmi.org>wrote:

>  Hi Michael,
>
>  Thanks for your response.  I am already calling show() and then raise()
> (though my SO question didn't make that clear -- sorry about that).  I
> think I'm having a different issue than the one in the link you provided,
> because my app behaves correctly when launched from the command line.  It
> only misbehaves when launched from the app-bundle (i.e. when launched with
> double-click).
>
>  For that reason, I suspect that perhaps there may be a subtle difference
> in the way the app bundle launches the main thread.  (Grasping in the dark
> here...)  Any py2app experts out there care to comment?
>
>  -Stuart
>
>  On May 15, 2013, at 4:50 PM, Michael McCracken wrote:
>
>  Hi, I answered on stack overflow too - but the short version is call
> show() *then also call*  raise_() on your main window.
>
>  The answer to an earlier version of this question has a couple of links
> for more background:
> http://stackoverflow.com/questions/3662559/why-does-my-pyqt-application-open-in-the-background-on-mac-os-x
>
>
> On Wed, May 15, 2013 at 1:32 PM, Berg, Stuart <bergs at janelia.hhmi.org>wrote:
>
>> Hi,
>>
>> I'm using py2app to packages my (cross-platform) PyQt app into a Mac OS X
>> application bundle.  (py2app is great, btw!)
>>
>> I was wondering if anyone could point me to some documentation that
>> explains in detail how a python app bundle's launch process differs from
>> launching the python app directly from the command-line.  My app bundle
>> seems to function exactly the same in most respects, but my main window
>> doesn't activate unless I manually activate the application via command-tab.
>>
>> I give a few more details in this question on stack overflow:
>>
>> http://stackoverflow.com/questions/16574315/qt-mainwindow-does-not-appear-until-application-is-activated-manually
>>
>> Any ideas, suggestions, or links would be appreciated.
>>
>> Thanks,
>> Stuart
>>
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20130515/4b343512/attachment-0001.html>


More information about the Pythonmac-SIG mailing list