[PyQt] Stop main window from showing when closing dialog
Entity Reborn
entityreborn at gmail.com
Thu Mar 24 15:05:51 GMT 2011
How are you closing the dialog, .close()? Try .hide() and recycling
the window for later. Some example code that exhibits this problem
would be most excellent as well!
On Mar 24, 2011, at 7:40 AM, Mikael Modin <micke.modin at gmail.com> wrote:
> Hi,
>
> I'm working on a background application that sometimes show a dialog in a lower corner, most of the time it's meant to just sit queitly in the taskbar or system tray. My problem is this; When the dialog in the corner is closed the main window get the focus again and becomes the top window, stealing it from whichever window had it before.
>
> The corner window doesn't take the focus when shown which is correct. Now I just need to stop the main window from receiving the focus when the corner dialog is closed, or failing that loose it directly after getting it.
>
> I tried setting parent to None when calling QDialog.__init__ for my corner dialog but then it didn't show up at all. If anyone has any idea how to fix this I'd greatly appreciate it.
>
> Regards,
> Mikael
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list