Trees | Indices | Help |
|
---|
|
1 # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved. 2 # This example assumes that PySide was built and setup with Nuke's Qt Version 3 # !! It will only work in this situation !! 4 # otherwise use the other example PyQtRender.py 5 import sys, os.path 6 import nuke, nukescripts 7 8 try: 9 from PySide import QtCore, QtWidgets, QtUiTools 10 except: 11 from PySide2 import QtCore, QtWidgets, QtUiTools 1244 4815 # Set up the user interface from Designer. 16 filepath = os.path.join(os.path.dirname(nukescripts.__file__), "pyQtExamples", "pyQtRender.ui") 17 file = QtCore.QFile( filepath ) 18 file.open( QtCore.QIODevice.ReadOnly ) 19 20 loader = QtUiTools.QUiLoader() 21 self.ui = loader.load( file ) 22 self.ui.connect(self.ui.renderButton, QtCore.SIGNAL("clicked()"), self.render) 23 nuke.addOnCreate(self.onCreateCallback)2426 self.ui.show()27 3335 item = QtWidgets.QTreeWidgetItem() 36 item.setText(0, n['name'].value()) 37 self.ui.treeWidget.addTopLevelItem(item)38
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 5 06:16:29 2017 | http://epydoc.sourceforge.net |