Popup window from core hooks

Hi folks!

I’d like to implement a popup window to warn users about specific things relating to our pipeline. Ideally I’d like to call this from a core hook like engine_init.py

I’ve been trying to use the tk-framework-qtwidgets message box from the demo app to do this but with no luck.

within the engine init hook I’ve tried this self.load_framework("tk-framework-qtwidgets") but get a:

tank.errors.TankError: Cannot load framework tk-framework-qtwidgets for <Sgtk Core HEAD@0x1a41a2e0548 Config c:\SG\.......\cfg> - it does not have a valid engine property!

This is strange as I’d think this hook runs after the engine is initialized?

End goal here is just to have a popup warning to inform users to do XYZ or check something if I’ve detected a problem that cant be automatically fixed.


Is this to appear from sg_desktop? Or from within a certain app?

From SG Desktop preferably

Hi @Justin_Pedersen !

Hope you are well!? :smiley: Might have a totally overcomplicated solution for you: The tk-desktop engine has a run_at_startup setting that launches apps, well, at startup! So you could create a custom app that uses the “tk-framework-qtwidgets” to display a message at startup!
That’s the best thing I could come up with :sweat_smile: !


1 Like

Hey Fabian so good to hear from you!

I sat bashing my head on this one for longer than I’d like to admit and that sounds like a viable solve to this. Will leave some needed room for expansion going that route.

Will give this a go!


1 Like

Oh… thats handy :o

1 Like