Search - User list
Full Version: PDG, Startup Scripts and Qt
Root » PDG/TOPs » PDG, Startup Scripts and Qt
michlvfx
Hi guys,

I'm currently having the issue that my ROP Geometry Output nodes in TOPs are failing whenever I'm using my 123.py startup script with the following error log:
QWidget: Must construct a QApplication before a QWidget
If I got it right in the TOPs documentation, I believe this is due to the fact that TOPs spawns one or multiple new Houdini instances which will then run the task(s). I think those subprocesses are opened up without the GUI and therefore there was no QApplication initialized before I am calling my custom pipeline window.
Is there any way to query if the current process was opened by TOPs? This way I could still open the window when a user opened Houdini but ignore it when TOPs did it.
I also tried the
if __name__ == '__main__'
condition, but that didn't make a difference either.


Thanks for your help in advance!

Michael
michlvfx
Here is a way to get around that issue. I'm only calling the startup scripts which are using Qt with the following condition:

if not 'hython' in os.path.basename(sys.executable):
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB