Qyoto  4.0.6
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QBoxLayout Class Reference

The QBoxLayout class lines up child widgets horizontally or vertically. More...

Inheritance diagram for QtGui.QBoxLayout:
Collaboration diagram for QtGui.QBoxLayout:

Public Types

enum  Direction {
  BottomToTop = 3, Down = 2, LeftToRight = 0, RightToLeft = 1,
  TopToBottom = 2, Up = 3
}
  More...
 
- Public Types inherited from QtGui.QLayout
enum  SizeConstraint {
  SetDefaultConstraint = 0, SetFixedSize = 3, SetMaximumSize = 4, SetMinAndMaxSize = 5,
  SetMinimumSize = 2, SetNoConstraint = 1
}
  More...
 

Public Member Functions

 QBoxLayout (QBoxLayout.Direction dir, QWidget parent=null)
 
 
override void CreateProxy ()
 
override void AddItem (IQLayoutItem item)
 
 
new void AddLayout (QLayout layout, int stretch=0)
 
 
new void AddSpacerItem (QSpacerItem spacerItem)
 
 
new void AddSpacing (int size)
 
 
new void AddStretch (int stretch=0)
 
 
new void AddStrut (int size)
 
 
new void AddWidget (QWidget widget, int stretch=0, Qt.AlignmentFlag alignment=0)
 
 
override int HeightForWidth (int w)
 
 
new void InsertLayout (int index, QLayout layout, int stretch=0)
 
 
new void InsertSpacerItem (int index, QSpacerItem spacerItem)
 
 
new void InsertSpacing (int index, int size)
 
 
new void InsertStretch (int index, int stretch=0)
 
 
new void InsertWidget (int index, QWidget widget, int stretch=0, Qt.AlignmentFlag alignment=0)
 
 
override void Invalidate ()
 
 
override IQLayoutItem ItemAt (int index)
 
 
override int MinimumHeightForWidth (int w)
 
 
new void SetStretch (int index, int stretch)
 
 
new bool SetStretchFactor (QWidget w, int stretch)
 
 
new bool SetStretchFactor (QLayout l, int stretch)
 
 
new int Stretch (int index)
 
 
override IQLayoutItem TakeAt (int index)
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QLayout
 QLayout ()
 
 
 QLayout (QWidget parent)
 
 
override void CreateProxy ()
 
new bool Activate ()
 
 
new void AddWidget (QWidget w)
 
 
new void GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom)
 
 
virtual int IndexOf (QWidget widget)
 
 
new void RemoveItem (IQLayoutItem item)
 
 
new void RemoveWidget (QWidget w)
 
 
new bool SetAlignment (QWidget w, Qt.AlignmentFlag alignment)
 
 
new bool SetAlignment (QLayout l, Qt.AlignmentFlag alignment)
 
 
new void SetContentsMargins (int left, int top, int right, int bottom)
 
 
new void SetEnabled (bool enable)
 
 
new int TotalHeightForWidth (int w)
 
new void Update ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
 
 
new bool BlockSignals (bool b)
 
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
new void DeleteLater ()
 
 
new bool Disconnect (QObject receiver, string member=null)
 
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
 
 
new void DumpObjectInfo ()
 
 
new void DumpObjectTree ()
 
 
virtual bool OnEvent (QEvent e)
 
 
virtual bool EventFilter (QObject watched, QEvent @event)
 
 
new bool Inherits (string classname)
 
 
new void InstallEventFilter (QObject filterObj)
 
 
new void KillTimer (int id)
 
 
new object Property (string name)
 
 
new void RemoveEventFilter (QObject obj)
 
 
new bool SetProperty (string name, object value)
 
 
new void SetUserData (uint id, QObjectUserData data)
 
new int StartTimer (int interval)
 
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 
- Public Member Functions inherited from QtGui.IQLayoutItem
int HeightForWidth (int w)
 
 
void Invalidate ()
 
 
int MinimumHeightForWidth (int w)
 
 

Static Public Member Functions

static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtGui.QLayout
static QSize ClosestAcceptableSize (QWidget w, QSize s)
 
 
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtCore.QObject
static bool Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
 
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
 
 
static string Tr (string s, string c=null)
 
 
static string Tr (string s, string c, int n)
 
 
static string TrUtf8 (string s, string c=null)
 
 
static string TrUtf8 (string s, string c, int n)
 
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream stream, QSizeF size)
 
 
static QDataStream Write (QDataStream stream, QPoint point)
 
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream stream, QLineF line)
 
 
static QDataStream Write (QDataStream stream, QPointF point)
 
 
static QDataStream Write (QDataStream @out, QChar chr)
 
 
static QDataStream Write (QDataStream @out, QByteArray ba)
 
 
static QDataStream Write (QDataStream stream, QEasingCurve easing)
 
 
static QDataStream Write (QDataStream stream, QRectF rectangle)
 
 
static QDataStream Write (QDataStream @out, QDateTime dateTime)
 
 
static QDataStream Write (QDataStream @out, QUrl url)
 
 
static QDataStream Write (QDataStream @out, QTime time)
 
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream @out, QBitArray ba)
 
 
static QDataStream Write (QDataStream s, QUuid id)
 
 
static QDataStream Write (QDataStream stream, QLine line)
 
 
static QDataStream Write (QDataStream @out, QDate date)
 
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
 
 
static QDataStream Write (QDataStream stream, QRect rectangle)
 
 
static QDataStream Write (QDataStream stream, QSize size)
 
 
static QDataStream Write (QDataStream s, QVariant.Type p)
 
static QDataStream Write (QDataStream arg1, string arg2)
 
static QDataStream Write (QDataStream @out, System.Collections.Generic.List< string > list)
 
 
static QDataStream Read (QDataStream @in, QChar chr)
 
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream stream, QRect rectangle)
 
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream @in, QDate date)
 
 
static QDataStream Read (QDataStream @in, QUrl url)
 
 
static QDataStream Read (QDataStream s, QUuid id)
 
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream stream, QLineF line)
 
 
static QDataStream Read (QDataStream stream, QRectF rectangle)
 
 
static QDataStream Read (QDataStream stream, QPointF point)
 
 
static QDataStream Read (QDataStream stream, QLine line)
 
 
static QDataStream Read (QDataStream @in, QBitArray ba)
 
 
static QDataStream Read (QDataStream stream, QSize size)
 
 
static QDataStream Read (QDataStream @in, QDateTime dateTime)
 
 
static QDataStream Read (QDataStream @in, QTime time)
 
 
static QDataStream Read (QDataStream stream, QPoint point)
 
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
 
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream @in, QByteArray ba)
 
 
static QDataStream Read (QDataStream stream, QSizeF size)
 
 
static QDataStream Read (QDataStream arg1, string arg2)
 
static QDataStream Read (QDataStream s, QVariant.Type p)
 
static QDataStream Read (QDataStream @in, System.Collections.Generic.List< string > list)
 
 
static double QAcos (double v)
 
 
static void QAddPostRoutine (System.Action ptr)
 
 
static double QAsin (double v)
 
 
static double QAtan (double v)
 
 
static double QAtan2 (double x, double y)
 
 
static void QBadAlloc ()
 
static int QCeil (double v)
 
 
static ushort QChecksum (string s, uint len)
 
 
static QByteArray QCompress (QByteArray data, int compressionLevel=-1)
 
 
static QByteArray QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
 
 
static double QCos (double v)
 
 
static double QExp (double v)
 
 
static double QFabs (double v)
 
static double QFastCos (double x)
 
static double QFastSin (double x)
 
static string QFlagLocation (string method)
 
static int QFloor (double v)
 
 
static bool QFuzzyCompare (double p1, double p2)
 
static bool QFuzzyCompare (float p1, float p2)
 
static bool QFuzzyIsNull (double d)
 
static bool QFuzzyIsNull (float f)
 
static uint QHash (QBitArray key)
 
 
static uint QHash (QChar key)
 
 
static uint QHash (QStringRef key)
 
static uint QHash (QUrl url)
 
 
static uint QHash (QPersistentModelIndex index)
 
static uint QHash (QByteArray key)
 
 
static uint QHash (QModelIndex index)
 
static uint QHash (uint key)
 
 
static uint QHash (char key)
 
 
static uint QHash (byte key)
 
 
static uint QHash (short key)
 
 
static uint QHash (NativeLong key)
 
 
static uint QHash (ushort key)
 
 
static uint QHash (long key)
 
 
static uint QHash (ulong key)
 
 
static uint QHash (int key)
 
 
static uint QHash (string key)
 
 
static uint QHash (NativeULong key)
 
 
static Qt.ActionQtMsgTypeString QInstallMsgHandler (Qt.ActionQtMsgTypeString arg1)
 
static int QIntCast (float f)
 
static int QIntCast (double f)
 
static bool QIsFinite (double d)
 
static bool QIsFinite (float f)
 
static bool QIsInf (float f)
 
static bool QIsInf (double d)
 
static bool QIsNaN (float f)
 
static bool QIsNaN (double d)
 
static bool QIsNull (float f)
 
static bool QIsNull (double d)
 
static double QLn (double v)
 
 
static double QPow (double x, double y)
 
 
static void QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
 
 
static void QRemovePostRoutine (System.Action arg1)
 
static int QRound (double d)
 
static long QRound64 (double d)
 
static double QSin (double v)
 
 
static double QSqrt (double v)
 
 
static bool QStringComparisonHelper (QStringRef s1, string s2)
 
static double QTan (double v)
 
 
static QByteArray QUncompress (QByteArray data)
 
 
static QByteArray QUncompress (Pointer< byte > data, int nbytes)
 
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
 
static bool Qputenv (string varName, QByteArray value)
 
static void Qsrand (uint seed)
 
static int Qstrcmp (QByteArray str1, QByteArray str2)
 
static int Qstrcmp (QByteArray str1, string str2)
 
static int Qstrcmp (string str1, QByteArray str2)
 
static int Qstrcmp (string str1, string str2)
 
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
 
 
static Pointer< sbyte > Qstrdup (string src)
 
 
static int Qstricmp (string str1, string str2)
 
 
static uint Qstrlen (string str)
 
 
static int Qstrncmp (string str1, string str2, uint len)
 
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
 
 
static int Qstrnicmp (string str1, string str2, uint len)
 
 
static uint Qstrnlen (string str, uint maxlen)
 
 
static string QtTrId (string id, int n=-1)
 

Protected Member Functions

 QBoxLayout (System.Type dummy)
 
new void InsertItem (int index, IQLayoutItem item)
 
 
- Protected Member Functions inherited from QtGui.QLayout
 QLayout (System.Type dummy)
 
new void AddChildLayout (QLayout l)
 
 
new void AddChildWidget (QWidget w)
 
 
new QRect AlignmentRect (QRect r)
 
 
override void OnChildEvent (QChildEvent e)
 
 
new void OnWidgetEvent (QEvent arg1)
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent @event)
 
 
virtual void ConnectNotify (string signal)
 
 
virtual void OnCustomEvent (QEvent @event)
 
 
new void OnDestroyed (QObject obj=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
virtual void OnTimerEvent (QTimerEvent @event)
 
 

Properties

QBoxLayout.Direction direction [get, set]
 
 
override QRect Geometry [get, set]
 
 
int spacing [get, set]
 
 
override int Count [get]
 
 
override Qt.Orientation ExpandingDirections [get]
 
 
override bool HasHeightForWidth [get]
 
 
override QSize MaximumSize [get]
 
 
override QSize MinimumSize [get]
 
 
override QSize SizeHint [get]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQBoxLayoutSignals Emit [get]
 
- Properties inherited from QtGui.QLayout
virtual EventHandler
< QEventArgs< QEvent > > 
WidgetEvent
 
Qt.AlignmentFlag Alignment [get, set]
 
 
QMargins ContentsMargins [get, set]
 
 
virtual QRect Geometry [get, set]
 
 
QWidget MenuBar [get, set]
 
 
virtual Qt.Orientation ExpandingDirections [get]
 
 
virtual bool IsEmpty [get]
 
 
virtual QLayout Layout [get]
 
 
virtual QSize MaximumSize [get]
 
 
virtual QSize MinimumSize [get]
 
 
QSizePolicy.ControlType ControlTypes [get]
 
virtual bool HasHeightForWidth [get]
 
virtual QSize SizeHint [get]
 
virtual QSpacerItem SpacerItem [get]
 
virtual QWidget Widget [get]
 
QRect ContentsRect [get]
 
 
virtual int Count [get]
 
 
bool IsEnabled [get]
 
 
QWidget ParentWidget [get]
 
 
QSize TotalMaximumSize [get]
 
QSize TotalMinimumSize [get]
 
QSize TotalSizeHint [get]
 
new int Margin [get, set]
 
 
new int Spacing [get, set]
 
 
new SizeConstraint sizeConstraint [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new Qt.AlignmentFlag Align [get, set]
 
new IQLayoutSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
 
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
 
 
Slot< QObjectDestroyedQObject
 
Slot Destroyed
 
 
QObject Parent [get, set]
 
 
System.Collections.Generic.List
< QObject
Children [get]
 
 
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames [get]
 
 
bool IsWidgetType [get]
 
 
static uint RegisterUserData [get]
 
QObject Sender [get]
 
 
int SenderSignalIndex [get]
 
 
bool SignalsBlocked [get]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 
- Properties inherited from QtCore.Qt
static string QAppName [get]
 
static double QInf [get]
 
static double QQNaN [get]
 
static double QSNaN [get]
 
static bool QSharedBuild [get]
 
static string QVersion [get]
 
static int Qrand [get]
 
- Properties inherited from QtGui.IQLayoutItem
Qt.AlignmentFlag Alignment [get, set]
 
 
QRect Geometry [get, set]
 
 
QSizePolicy.ControlType ControlTypes [get]
 
 
Qt.Orientation ExpandingDirections [get]
 
 
System.Boolean HasHeightForWidth [get]
 
 
System.Boolean IsEmpty [get]
 
 
QLayout Layout [get]
 
 
QSize MaximumSize [get]
 
 
QSize MinimumSize [get]
 
 
QSize SizeHint [get]
 
 
QSpacerItem SpacerItem [get]
 
 
QWidget Widget [get]
 
 

Additional Inherited Members

- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QBoxLayout class lines up child widgets horizontally or vertically.

QBoxLayout takes the space it gets (from its parent layout or from the parentWidget()), divides it up into a row of boxes, and makes each managed widget fill one box.

If the QBoxLayout's orientation is Qt::Horizontal the boxes are placed in a row, with suitable sizes. Each widget (or other box) will get at least its minimum size and at most its maximum size. Any excess space is shared according to the stretch factors (more about that below).

If the QBoxLayout's orientation is Qt::Vertical, the boxes are placed in a column, again with suitable sizes.

The easiest way to create a QBoxLayout is to use one of the convenience classes, e.g. QHBoxLayout (for Qt::Horizontal boxes) or QVBoxLayout (for Qt::Vertical boxes). You can also use the QBoxLayout constructor directly, specifying its direction as LeftToRight, RightToLeft, TopToBottom, or BottomToTop.

If the QBoxLayout is not the top-level layout (i.e. it is not managing all of the widget's area and children), you must add it to its parent layout before you can do anything with it. The normal way to add a layout is by calling parentLayout->addLayout().

Once you have done this, you can add boxes to the QBoxLayout using one of four functions:

addWidget() to add a widget to the QBoxLayout and set the widget's stretch factor. (The stretch factor is along the row of boxes.)

addSpacing() to create an empty box; this is one of the functions you use to create nice and spacious dialogs. See below for ways to set margins.

addStretch() to create an empty, stretchable box.

addLayout() to add a box containing another QLayout to the row and set that layout's stretch factor.

Use insertWidget(), insertSpacing(), insertStretch() or insertLayout() to insert a box at a specified position in the layout.

QBoxLayout also includes two margin widths:

setContentsMargins() sets the width of the outer border on each side of the widget. This is the width of the reserved space along each of the QBoxLayout's four sides.

setSpacing() sets the width between neighboring boxes. (You can use addSpacing() to get more space at a particular spot.)

The margin default is provided by the style. The default margin most Qt styles specify is 9 for child widgets and 11 for windows. The spacing defaults to the same as the margin width for a top-level layout, or to the same as the parent layout.

To remove a widget from a layout, call removeWidget(). Calling QWidget::hide() on a widget also effectively removes the widget from the layout until QWidget::show() is called.

You will almost always want to use QVBoxLayout and QHBoxLayout rather than QBoxLayout because of their convenient constructors.

See also QGridLayout, QStackedLayout, and Layout Management.

Member Enumeration Documentation

This type is used to determine the direction of a box layout.

Enumerator:
BottomToTop 

Vertical from bottom to top.

Down 
LeftToRight 

Horizontal from left to right.

RightToLeft 

Horizontal from right to left.

TopToBottom 

Vertical from top to bottom.

Up 

Constructor & Destructor Documentation

QtGui.QBoxLayout.QBoxLayout ( System.Type  dummy)
protected
QtGui.QBoxLayout.QBoxLayout ( QBoxLayout.Direction  dir,
QWidget  parent = null 
)

Constructs a new QBoxLayout with direction dir and parent widget parent.

See also direction().

Member Function Documentation

override void QtGui.QBoxLayout.AddItem ( IQLayoutItem  item)
virtual

Reimplemented from QLayout::addItem().

Implements QtGui.QLayout.

new void QtGui.QBoxLayout.AddLayout ( QLayout  layout,
int  stretch = 0 
)

Adds layout to the end of the box, with serial stretch factor stretch.

See also insertLayout(), addItem(), and addWidget().

new void QtGui.QBoxLayout.AddSpacerItem ( QSpacerItem  spacerItem)

Adds spacerItem to the end of this box layout.

This function was introduced in Qt 4.4.

See also addSpacing() and addStretch().

new void QtGui.QBoxLayout.AddSpacing ( int  size)

Adds a non-stretchable space (a QSpacerItem) with size size to the end of this box layout. QBoxLayout provides default margin and spacing. This function adds additional space.

See also insertSpacing(), addItem(), and QSpacerItem.

new void QtGui.QBoxLayout.AddStretch ( int  stretch = 0)

Adds a stretchable space (a QSpacerItem) with zero minimum size and stretch factor stretch to the end of this box layout.

See also insertStretch(), addItem(), and QSpacerItem.

new void QtGui.QBoxLayout.AddStrut ( int  size)

Limits the perpendicular dimension of the box (e.g. height if the box is LeftToRight) to a minimum of size. Other constraints may increase the limit.

See also addItem().

new void QtGui.QBoxLayout.AddWidget ( QWidget  widget,
int  stretch = 0,
Qt.AlignmentFlag  alignment = 0 
)

Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment.

The stretch factor applies only in the direction of the QBoxLayout, and is relative to the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more.

If the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to the QWidget:sizePolicy() of each widget that's involved.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

See also insertWidget(), addItem(), addLayout(), addStretch(), addSpacing(), and addStrut().

override void QtGui.QBoxLayout.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

Reimplemented in QtGui.QVBoxLayout, and QtGui.QHBoxLayout.

new void QtGui.QBoxLayout.Dispose ( )
override int QtGui.QBoxLayout.HeightForWidth ( int  w)
virtual

Reimplemented from QLayoutItem::heightForWidth().

Reimplemented from QtGui.QLayout.

new void QtGui.QBoxLayout.InsertItem ( int  index,
IQLayoutItem  item 
)
protected

Inserts item into this box layout at position index. If index is negative, the item is added at the end.

See also addItem(), insertWidget(), insertLayout(), insertStretch(), and insertSpacing().

new void QtGui.QBoxLayout.InsertLayout ( int  index,
QLayout  layout,
int  stretch = 0 
)

Inserts layout at position index, with stretch factor stretch. If index is negative, the layout is added at the end.

layout becomes a child of the box layout.

See also addLayout() and insertItem().

new void QtGui.QBoxLayout.InsertSpacerItem ( int  index,
QSpacerItem  spacerItem 
)

Inserts spacerItem at position index, with zero minimum size and stretch factor. If index is negative the space is added at the end.

This function was introduced in Qt 4.4.

See also addSpacerItem(), insertStretch(), and insertSpacing().

new void QtGui.QBoxLayout.InsertSpacing ( int  index,
int  size 
)

Inserts a non-stretchable space (a QSpacerItem) at position index, with size size. If index is negative the space is added at the end.

The box layout has default margin and spacing. This function adds additional space.

See also addSpacing(), insertItem(), and QSpacerItem.

new void QtGui.QBoxLayout.InsertStretch ( int  index,
int  stretch = 0 
)

Inserts a stretchable space (a QSpacerItem) at position index, with zero minimum size and stretch factor stretch. If index is negative the space is added at the end.

See also addStretch(), insertItem(), and QSpacerItem.

new void QtGui.QBoxLayout.InsertWidget ( int  index,
QWidget  widget,
int  stretch = 0,
Qt.AlignmentFlag  alignment = 0 
)

Inserts widget at position index, with stretch factor stretch and alignment alignment. If index is negative, the widget is added at the end.

The stretch factor applies only in the direction of the QBoxLayout, and is relative to the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more.

If the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to the QWidget:sizePolicy() of each widget that's involved.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

See also addWidget() and insertItem().

override void QtGui.QBoxLayout.Invalidate ( )
virtual

Reimplemented from QLayoutItem::invalidate().

Resets cached information.

Reimplemented from QtGui.QLayout.

override IQLayoutItem QtGui.QBoxLayout.ItemAt ( int  index)
virtual

Reimplemented from QLayout::itemAt().

Implements QtGui.QLayout.

override int QtGui.QBoxLayout.MinimumHeightForWidth ( int  w)
virtual

Reimplemented from QLayoutItem::minimumHeightForWidth().

Reimplemented from QtGui.QLayout.

new void QtGui.QBoxLayout.SetStretch ( int  index,
int  stretch 
)

Sets the stretch factor at position index. to stretch.

This function was introduced in Qt 4.5.

See also stretch().

new bool QtGui.QBoxLayout.SetStretchFactor ( QWidget  w,
int  stretch 
)

Sets the stretch factor for widget to stretch and returns true if widget is found in this layout (not including child layouts); otherwise returns false.

See also setAlignment().

new bool QtGui.QBoxLayout.SetStretchFactor ( QLayout  l,
int  stretch 
)

This is an overloaded function.

Sets the stretch factor for the layout layout to stretch and returns true if layout is found in this layout (not including child layouts); otherwise returns false.

new int QtGui.QBoxLayout.Stretch ( int  index)

Returns the stretch factor at position index.

This function was introduced in Qt 4.5.

See also setStretch().

override IQLayoutItem QtGui.QBoxLayout.TakeAt ( int  index)
virtual

Reimplemented from QLayout::takeAt().

Implements QtGui.QLayout.

static string QtGui.QBoxLayout.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QBoxLayout.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QBoxLayout.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QBoxLayout.TrUtf8 ( string  s,
string  c,
int  n 
)
static

Property Documentation

override int QtGui.QBoxLayout.Count
get

Reimplemented from QLayout::count().

QBoxLayout.Direction QtGui.QBoxLayout.direction
getset

Returns the direction of the box. addWidget() and addSpacing() work in this direction; the stretch stretches in this direction.

Sets the direction of this layout to direction.

new IQBoxLayoutSignals QtGui.QBoxLayout.Emit
getprotected
override Qt.Orientation QtGui.QBoxLayout.ExpandingDirections
get

Reimplemented from QLayoutItem::expandingDirections().

override QRect QtGui.QBoxLayout.Geometry
getset

Reimplemented from QLayoutItem::setGeometry().

override bool QtGui.QBoxLayout.HasHeightForWidth
get

Reimplemented from QLayoutItem::hasHeightForWidth().

override QSize QtGui.QBoxLayout.MaximumSize
get

Reimplemented from QLayoutItem::maximumSize().

override QSize QtGui.QBoxLayout.MinimumSize
get

Reimplemented from QLayoutItem::minimumSize().

Reimplemented from QLayoutItem::sizeHint().

int QtGui.QBoxLayout.spacing
getset

Reimplements QLayout::spacing(). If the spacing property is valid, that value is returned. Otherwise, a value for the spacing property is computed and returned. Since layout spacing in a widget is style dependent, if the parent is a widget, it queries the style for the (horizontal or vertical) spacing of the layout. Otherwise, the parent is a layout, and it queries the parent layout for the spacing().

Reimplements QLayout::setSpacing(). Sets the spacing property to spacing.

new QMetaObject QtGui.QBoxLayout.StaticMetaObject
staticget