Fourth Chapter layout Management

Source: Internet
Author: User

Summary: Some of the functions involved in layout management

----------------------------------------------------------

1. void Qwidget::setlayout (Qlayout * layout)

Sets the layout manager for this widget to layout. Set up layout manager for widget layout management

If there already is a layout manager installed the This widget, Qwidget won ' t let you install another. Must first delete the existing layout manager (returned by layout ()) before you can call SetLayout () with the new Layo Ut.

If layout is the layout manger on a different widget, setlayout () would reparent the layout and make it the layout manager For the This widget.

Example:

qvboxlayout *layout = new qvboxlayout; layout-AddWidget (Formwidget); setlayout (layout) ;


An alternative to calling this function is to pass this widget to the layout ' s constructor.

The qwidget would take ownership of layout.

See also layout () and layout Management.

Fourth Chapter layout Management

Related Article

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.