The usage of qtgui.qframe in Pyside

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.