Is is possible to run a function to check if a pyside window has been created ?



  • I am using pyside to create a window. However, I would like to call a print function once the window launches to say something like "your window has been created". I don't want to run the print function at the same time as I launch the window since I need to verify that the window actually gets created. Any ideas on how I would do that



  • Subclass QWindow. Reimplement an event handler such as FocusInEvent(event.). In your reimplementation, call the super handler, and also do your print.

    There may be a better event to snoop on. Probably the FocusInEvent() (receive the focus of keyboard events) comes after the window is painted, but I'm just guessing.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.