⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qlayout.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
'\" t.TH QLayout 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQLayout \- The base class of geometry managers.SH SYNOPSIS\fC#include <qlayout.h>\fR.PPInherits QObject and QLayoutItem..PPInherited by QGridLayout and QBoxLayout..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBResizeMode\fR { FreeResize, Minimum, Fixed, Auto }".br.ti -1c.BI "\fBQLayout\fR ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )".br.ti -1c.BI "\fBQLayout\fR ( QLayout * parentLayout, int spacing = -1, const char * name = 0 )".br.ti -1c.BI "\fBQLayout\fR ( int spacing = -1, const char * name = 0 )".br.ti -1c.BI "int \fBmargin\fR () const".br.ti -1c.BI "int \fBspacing\fR () const".br.ti -1c.BI "virtual void \fBsetMargin\fR ( int )".br.ti -1c.BI "virtual void \fBsetSpacing\fR ( int )".br.ti -1c.BI "void \fBsetResizeMode\fR ( ResizeMode )".br.ti -1c.BI "ResizeMode \fBresizeMode\fR () const".br.ti -1c.BI "virtual void \fBsetMenuBar\fR ( QMenuBar * w )".br.ti -1c.BI "QMenuBar * \fBmenuBar\fR () const".br.ti -1c.BI "QWidget * \fBmainWidget\fR ()".br.ti -1c.BI "bool \fBisTopLevel\fR () const".br.ti -1c.BI "virtual void \fBsetAutoAdd\fR ( bool b )".br.ti -1c.BI "bool \fBautoAdd\fR () const".br.ti -1c.BI "virtual void \fBinvalidate\fR ()".br.ti -1c.BI "bool \fBactivate\fR ()".br.ti -1c.BI "void \fBadd\fR ( QWidget * w )".br.ti -1c.BI "virtual void \fBaddItem\fR ( QLayoutItem * item ) = 0".br.ti -1c.BI "void \fBremove\fR ( QWidget * widget )".br.ti -1c.BI "void \fBremoveItem\fR ( QLayoutItem * item )".br.ti -1c.BI "virtual QSizePolicy::ExpandData \fBexpanding\fR () const".br.ti -1c.BI "virtual QSize \fBminimumSize\fR () const".br.ti -1c.BI "virtual QSize \fBmaximumSize\fR () const".br.ti -1c.BI "virtual void \fBsetGeometry\fR ( const QRect & r ) = 0".br.ti -1c.BI "virtual QLayoutIterator \fBiterator\fR () = 0".br.ti -1c.BI "virtual bool \fBisEmpty\fR () const".br.ti -1c.BI "bool \fBsupportsMargin\fR () const".br.ti -1c.BI "void \fBsetEnabled\fR ( bool enable )".br.ti -1c.BI "bool \fBisEnabled\fR () const".br.in -1c.SS "Properties".in +1c.ti -1c.BI "int \fBmargin\fR - the width of the outside border of the layout".br.ti -1c.BI "ResizeMode \fBresizeMode\fR - the resize mode of the layout".br.ti -1c.BI "int \fBspacing\fR - the spacing between widgets inside the layout".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "void \fBaddChildLayout\fR ( QLayout * l )".br.ti -1c.BI "void \fBdeleteAllItems\fR ()".br.ti -1c.BI "void \fBsetSupportsMargin\fR ( bool b )".br.ti -1c.BI "QRect \fBalignmentRect\fR ( const QRect & r ) const".br.in -1c.SH DESCRIPTIONThe QLayout class is the base class of geometry managers..PPThis is an abstract base class inherited by the concrete classes, QBoxLayout and QGridLayout..PPFor users of QLayout subclasses or of QMainWindow there is seldom any need to use the basic functions provided by QLayout, such as setResizeMode() or setMenuBar(). See the layout overview page for more information..PPTo make your own layout manager, subclass QGLayoutIterator and implement the functions addItem(), sizeHint(), setGeometry(), and iterator(). You should also implement minimumSize() to ensure your layout isn't resized to zero size if there is too little space. To support children whose heights depend on their widths, implement hasHeightForWidth() and heightForWidth(). See the custom layout page for an in-depth description..PPGeometry management stops when the layout manager is deleted..PPSee also Widget Appearance and Style and Layout Management..SS "Member Type Documentation".SH "QLayout::ResizeMode"The possible values are:.TP\fCQLayout::Auto\fR - If the main widget is a top-level widget with no height-for-width (hasHeightForWidth()), this is the same as \fCMinimium\fR; otherwise, this is the same as FreeResize..TP\fCQLayout::Fixed\fR - The main widget's size is set to sizeHint(); it cannot be resized at all..TP\fCQLayout::Minimum\fR - The main widget's minimum size is set to minimumSize(); it cannot be smaller..TP\fCQLayout::FreeResize\fR - The widget is not constrained..SH MEMBER FUNCTION DOCUMENTATION.SH "QLayout::QLayout ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )"Constructs a new top-level QLayout called \fIname\fR, with main widget \fIparent\fR. \fIparent\fR may not be 0..PPThe \fImargin\fR is the number of pixels between the edge of the widget and the managed children. The \fIspacing\fR sets the value of spacing(), which gives the spacing between the managed widgets. If \fIspacing\fR is -1 (the default), spacing is set to the value of \fImargin\fR..PPThere can be only one top-level layout for a widget. It is returned by QWidget::layout().SH "QLayout::QLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 )"Constructs a new child QLayout called \fIname\fR, and places it inside \fIparentLayout\fR by using the default placement defined by addItem()..PPIf \fIspacing\fR is -1, this QLayout inherits \fIparentLayout\fR's spacing(), otherwise the value of \fIspacing\fR is used..SH "QLayout::QLayout ( int spacing = -1, const char * name = 0 )"Constructs a new child QLayout called \fIname\fR. If \fIspacing\fR is -1, this QLayout inherits its parent's spacing(); otherwise the value of \fIspacing\fR is used..PPThis layout has to be inserted into another layout before geometry management will work..SH "bool QLayout::activate ()"Redoes the layout for mainWidget(). You should generally not need to call this because it is automatically called at the most appropriate times..PPHowever, if you set up a QLayout for a visible widget without resizing that widget, you will need to call this function in order to lay it out..PPSee also QWidget::updateGeometry()..PPExamples:.)l layout/layout.cpp, popup/popup.cpp, scrollview/scrollview.cpp, and sql/overview/form1/main.cpp..SH "void QLayout::add ( QWidget * w )"Adds widget \fIw\fR to this layout in a manner specific to the layout. This function uses addItem()..PPExamples:.)l customlayout/border.cpp and customlayout/main.cpp..SH "void QLayout::addChildLayout ( QLayout * l )\fC [protected]\fR"This function is called from addLayout() functions in subclasses to add layout \fIl\fR as a sub-layout..SH "void QLayout::addItem ( QLayoutItem * item )\fC [pure virtual]\fR"Implemented in subclasses to add an \fIitem\fR. How it is added is specific to each subclass..PPThe ownership of \fIitem\fR is transferred to the layout, and it's the layout's responsibility to delete it..PPExamples:.)l customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp..PPReimplemented in QGridLayout and QBoxLayout.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -