PDA

View Full Version : Focus application for mac



ecspertiza
18th April 2012, 10:07
Hi all. I use qt for develop mac. My programm run to system tray. If i open window of tray icon and focus on my app that window normal open. If i open window and focus on the other app, window open but it is under other window. How i can set the focus my window ?

P.S.: Sorry for my english :)

ecspertiza
18th April 2012, 15:28
I found it :)



ProcessSerialNumber psn;
OSErr err;

err = ::GetCurrentProcess(&psn);
if (err == noErr)
::SetFrontProcess(&psn);

QWidget::show()


this help me :)