The recent presence of a colleague has made me rethink the power of the designer tool in Pyside, and through the simplest and most straightforward method of QtGui.QObject.setGeometry (Qtcore.qrect), you can draw a lot of complex interfaces, To get rid of qtgui.qgridlayout (), Qvboxlayout (), Qhboxlayout () three layout () objects.
This time the Matchmove group needed a tool to output the selected model in the Maya project as an ABC file, automatically generate a nuke project based on the ABC file, and then submit the nuke project for local rendering or deadline farm rendering. All the functions are integrated in one tool, and it takes into account the neat and orderly interface, I decided to use the Qtgui.qframe object to divide the UI area, the final effect
The black box divides the interface into three areas and looks not cluttered.
A section of the logo is attached with the following code:
Logolabel = Qtgui.qlabel ("<font size= ' color= ' Gray ' ><b>render WIREFRAME tool</b ></font>") logolayout == qtgui.qframe (self) Self.frame1.setLayout (logolayout) self.frame1.setGeometry (Qtcore.qrect (5, 5, 390, +)) Self.frame1.setFrameShape (QtGui.QFrame.StyledPanel) Self.frame1.setFrameShadow (QtGui.QFrame.Raised)
Qtgui.qframe inherits from the Widgets class, which means that in addition to
defdrawframe (arg__1)defFramerect ()defFrameshadow ()defFrameshape ()defFrameStyle ()defframewidth ()deflinewidth ()defmidlinewidth ()defSetframerect (arg__1)defSetframeshadow (arg__1)defSetframeshape (arg__1)defSetframestyle (arg__1)defsetlinewidth (arg__1)defSetmidlinewidth (arg__1)
This series of own methods, Qtgui.qframe can also use the Widgets class method. In the code, I created a logolayout, added the control to the Logolayout, and passed logolayout to the Qframe object SetLayout this widgets method. In this way, you can easily add controls to the Qframe object.
The usage of qtgui.qframe in Pyside