Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window open after host dies #120

Closed
mottosso opened this issue Aug 19, 2015 · 4 comments
Closed

Window open after host dies #120

mottosso opened this issue Aug 19, 2015 · 4 comments
Labels

Comments

@mottosso
Copy link
Member

The QML window shouldn't remain open when the currently active host stops sending heartbeats.

@mottosso mottosso added the bug label Aug 19, 2015
@BigRoy
Copy link
Member

BigRoy commented Mar 2, 2017

This is likely resolved since 1.0.0 release. If not maybe we need to elaborate the problem some more.

@mottosso
Copy link
Member Author

mottosso commented Mar 2, 2017

It's only resolved in Maya, so far.

Odds are we'll have to implement a similar mechanism for other hosts, which is to put in a callback that quits QML on host exit. In Maya, this has been implemented as a scriptJob. Nuke and others may have a similar feature.

@BigRoy
Copy link
Member

BigRoy commented Mar 2, 2017

For Qt based hosts could we connect it to the aboutToQuit signal of the host Application?

http://doc.qt.io/qt-5/qcoreapplication.html#aboutToQuit

from Qt import QtWidgets

def on_application_quit():
    try:
        _state["currentServer"].popen.kill()

    except KeyError:
        # No server started
        pass

    except OSError:
        # Already dead
        pass

QtWidgets.QApplication.instance().aboutToQuit.connect(on_application_quit)

Just tested this in Maya. This is a working replacement for the scriptjob method.

@mottosso
Copy link
Member Author

mottosso commented Mar 2, 2017

That's a good idea!

mottosso added a commit that referenced this issue Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants