[Qt-interest] launch MacOS bundle

Tim Dewhirst tim at bugless.co.uk
Fri Aug 6 09:33:11 CEST 2010


Hello,

Serge wrote:
> i need to launch MacOS bundle from my QT program.
> If i use QProcess::startDetached and launching executable, located in 
> /Contents/MacOS, it is launching, but its button in taskbar have default 
> icon instead of custom icon, located in /Contents/Resources.
> 
> Same result i receive if launch executable from command line.
> 
> How to launch MacOS bundle, so that it would have needed icon in task 
> bar (work as bundle, not as single executable)?

If you're using QProcess, you could try running:

open -W /path/to/bundle.app

-W will make open wait until the application is quit.

This should do the right thing. There may well be an API to do this, but 
not being a native OS X dev. I don't know off hand...

Thanks,

Tim



More information about the Qt-interest-old mailing list