Parent pyside dialog to monitor

Hi,

I want to run a script, from various places including deadline. The script has a small dialog, so I’ve made it in pyside so it works in a few different scenarios.
For example if I ran it from inside Nuke it would pick up Nuke’s pyside - with a command like this QtGui.QApplication.instance()

Is this possible with deadline monitor? Get the monitor so I can parent to it? Or something like that… I’m not sure ‘what’ the monitor ui is. I usually just use the same methods in the submission scripts etc. Is this the only way? scriptDialog = DeadlineScriptDialog()

The Monitor is using Qt, but we bind to that using PyQt. I’m not sure the differences between the two here as I’ve never gotten the chance to play around with it.

You’re just after a modal dialog or somesuch? Our usual way of doing things is to just run an external app/script via popen. Think like our VNC or RDP right-click scripts.

Yeah a little modal dialog, do you mean running Python externally then? (I’ll check the ones you mentioned I’m just not in front of my machine right now)

pyqt and pyside? Very little it seems to me.

Hey Simon,

You should be able to get a reference to the current QApplication instance in much the same way through Deadline. We are using PyQt though, as Edwin mentioned, so I’m guessing the only difference would be in the imports/namespace:

from PyQt5.QtWidgets import *
qApp = QApplication.instance()

Thanks guys. I think it might me too much trouble to mix.

I am able to run my script as I would from any an application that isn’t using QT (by making a qpplication with pyside rather than using the pyqt one) so I might just leave it at that for now at least