Looks like this does the trick, though it seems somewhat brute force:
from PySide import QtGui for widget in QtGui.QApplication.allWidgets():
name = widget.objectName() if name == 'com.nukepedia.nuBridge':
stackedWidget = widget.parentWidget()
stackedWidget.setCurrentIndex(stackedWidget.indexOf(widget)) break
I will roll with that for now but if anybody has a more elegant solution
I'm all ears.
Cheers, frank
On 30/01/17 11:09 AM, Frank Rueter|OHUfx wrote:
Hi all, does anybody know if it's possible to float a docked QT panel
via python? E.g. the equivalent of ctrl+click on the tab? I am just
working on the nuBridge
<https://vimeo.com/channels/nukepedia/165747936> again and would like
to make it so that the user can call it from the help menu as well as
create a custom panel as part of the workspace. I got all that in
place but the challenge arises when trying to only use one instance of
the panel (i.e. singleton). In that case, when the panel is already
docked somewhere, and the user calls it from the help menu, I want the
panel to either float, or at least come to the foreground (if it's a
background tab at that point). Any ideas how to do that? I can't find
native nuke commands for this so will try and dig into the QT widgets
to see if I can force this behaviour. Cheers, frank
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/compositing.html> | *workflow customisation and
consulting <http://ohufx.com/customising.html>* *
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python