PDA

View Full Version : show new dialog with keeping focus.



guri
6th October 2011, 09:59
Hello.

I wanna make an alarm dialog which doesn't have a focus.

These days, I'm making the alarm dialog however when the dialog appears, window focus is switched to the dialog.

I want to keep window focus even though the dialog appears.

How can I make?

Thank you

lyuts
6th October 2011, 12:03
The first that comes to me mind is calling showMinimized(), but it affects only windows.

guri
7th October 2011, 01:34
I found good solution!

setAttribute(Qt::WA_ShowWithoutActivating);

lyuts
7th October 2011, 10:04
Great. Honestly, I didn't know this option exists. I will know now.