You can user the closeEvent to trap when a panel is closed
from PySide.QtGui import *
class Panel(QWidget):
def __init__(self):
super(Panel, self).__init__()
push = QPushButton("Close me")
layout = QHBoxLayout()
layout.addWidget(push)
self.setLayout(layout)
push.clicked.connect(self.close)
def closeEvent(self, QCloseEvent):
nuke.message("Panel closed")
p = Panel()
p.show()
--
Hugo Léveillé
Head of 2D, MELS
[email protected]
On Tue, Mar 22, 2016, at 06:28, Johannes Hezer wrote:
> Hey Everyone,
>
> A friend of mine asked me the other day, if one can catch a trigger if a
> custom panel with a widget inside is being closed.
> I had a more than brief look, but I could not find anything.
>
> what is pyui.Dialog and is there maybe a way to get this from there ?
> hideEvent and showEvent are triggered but at the sametime, so I could
> not make use of that...
>
> Thanks,
>
> Johannes
>
> --
> STUDIO RAKETE GmbH
> Johannes Hezer, Compositing TD & Stereoscopic SV
> Schomburgstr. 120
> D - 22767 Hamburg
>
> [email protected]
> Tel:+49 (0)40 - 380 375 69 - 0
> Fax:+49 (0)40 - 380 375 69 - 99
>
> ------------------------------------------------------
> Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:
>
> STUDIO RAKETE GmbH
> Schomburgstr. 120 D - 22767 Hamburg
>
> www.studiorakete.de / [email protected]
>
> Geschaeftsfuehrer: Jana Bohl
>
> Die Gesellschaft ist eingetragen im Handelregister des
> Amtsgerichts Hamburg unter der Nummer HR B 95660
> USt.-ID Nr.: DE 245787817
>
>
>
> ____ ESET 13215 (20160322) ____
> The message was checked by ESET Mail Security.
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python