Qyoto
4.0.6
Qyoto is a C# language binding for Qt
|
The QFormLayout class manages forms of input widgets and their associated labels. More...
Public Types | |
enum | FieldGrowthPolicy { AllNonFixedFieldsGrow = 2, ExpandingFieldsGrow = 1, FieldsStayAtSizeHint = 0 } |
More... | |
enum | ItemRole { FieldRole = 1, LabelRole = 0, SpanningRole = 2 } |
More... | |
enum | RowWrapPolicy { DontWrapRows = 0, WrapAllRows = 2, WrapLongRows = 1 } |
More... | |
![]() | |
enum | SizeConstraint { SetDefaultConstraint = 0, SetFixedSize = 3, SetMaximumSize = 4, SetMinAndMaxSize = 5, SetMinimumSize = 2, SetNoConstraint = 1 } |
More... | |
Public Member Functions | |
QFormLayout (QWidget parent=null) | |
| |
override void | CreateProxy () |
override void | AddItem (IQLayoutItem item) |
| |
new void | AddRow (QWidget widget) |
| |
new void | AddRow (QLayout layout) |
| |
new void | AddRow (QWidget label, QWidget field) |
| |
new void | AddRow (QWidget label, QLayout field) |
| |
new void | AddRow (string labelText, QWidget field) |
| |
new void | AddRow (string labelText, QLayout field) |
| |
new void | GetItemPosition (int index, ref int rowPtr, QFormLayout.ItemRole rolePtr) |
| |
new void | GetLayoutPosition (QLayout layout, ref int rowPtr, QFormLayout.ItemRole rolePtr) |
| |
new void | GetWidgetPosition (QWidget widget, ref int rowPtr, QFormLayout.ItemRole rolePtr) |
| |
override int | HeightForWidth (int width) |
| |
new void | InsertRow (int row, QWidget widget) |
| |
new void | InsertRow (int row, QLayout layout) |
| |
new void | InsertRow (int row, QWidget label, QWidget field) |
| |
new void | InsertRow (int row, QWidget label, QLayout field) |
| |
new void | InsertRow (int row, string labelText, QWidget field) |
| |
new void | InsertRow (int row, string labelText, QLayout field) |
| |
override void | Invalidate () |
| |
override IQLayoutItem | ItemAt (int index) |
| |
new IQLayoutItem | ItemAt (int row, QFormLayout.ItemRole role) |
| |
new QWidget | LabelForField (QWidget field) |
| |
new QWidget | LabelForField (QLayout field) |
| |
new void | SetItem (int row, QFormLayout.ItemRole role, IQLayoutItem item) |
| |
new void | SetLayout (int row, QFormLayout.ItemRole role, QLayout layout) |
| |
new void | SetWidget (int row, QFormLayout.ItemRole role, QWidget widget) |
| |
override IQLayoutItem | TakeAt (int index) |
| |
new void | Dispose () |
![]() | |
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 () |
virtual int | MinimumHeightForWidth (int w) |
![]() | |
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 () |
![]() | |
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) |
![]() | |
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 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 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 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 | |
QFormLayout (System.Type dummy) | |
![]() | |
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) |
![]() | |
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 | |
override QRect | Geometry [get, set] |
| |
int | spacing [get, set] |
| |
override int | Count [get] |
| |
override Qt.Orientation | ExpandingDirections [get] |
| |
override bool | HasHeightForWidth [get] |
| |
override QSize | MinimumSize [get] |
| |
override QSize | SizeHint [get] |
| |
int | RowCount [get] |
| |
new FieldGrowthPolicy | fieldGrowthPolicy [get, set] |
| |
new RowWrapPolicy | rowWrapPolicy [get, set] |
| |
new Qt.AlignmentFlag | LabelAlignment [get, set] |
| |
new Qt.AlignmentFlag | FormAlignment [get, set] |
| |
new int | HorizontalSpacing [get, set] |
| |
new int | VerticalSpacing [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQFormLayoutSignals | Emit [get] |
![]() | |
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] |
![]() | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
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] |
![]() | |
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] |
![]() | |
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 | |
![]() | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QFormLayout class manages forms of input widgets and their associated labels.
QFormLayout is a convenience layout class that lays out its children in a two-column form. The left column consists of labels and the right column consists of "field" widgets (line editors, spin boxes, etc.).
Traditionally, such two-column form layouts were achieved using QGridLayout. QFormLayout is a higher-level alternative that provides the following advantages:
Adherence to the different platform's look and feel guidelines.For example, the Mac OS X Aqua and KDE guidelines specify that the labels should be right-aligned, whereas Windows and GNOME applications normally use left-alignment.
Support for wrapping long rows.For devices with small displays, QFormLayout can be set to wrap long rows, or even to wrap all rows.
Convenient API for creating label–field pairs.The addRow() overload that takes a QString and a QWidget * creates a QLabel behind the scenes and automatically set up its buddy. We can then write code like this:
QFormLayout *formLayout = new QFormLayout;
formLayout->addRow(tr("&Name:"), nameLineEdit);
formLayout->addRow(tr("&Email:"), emailLineEdit);
formLayout->addRow(tr("&Age:"), ageSpinBox);
setLayout(formLayout);
Compare this with the following code, written using QGridLayout:
nameLabel = new QLabel(tr("&Name:"));
nameLabel->setBuddy(nameLineEdit);
emailLabel = new QLabel(tr("&Name:"));
emailLabel->setBuddy(emailLineEdit);
ageLabel = new QLabel(tr("&Name:"));
ageLabel->setBuddy(ageSpinBox);
QGridLayout *gridLayout = new QGridLayout;
gridLayout->addWidget(nameLabel, 0, 0);
gridLayout->addWidget(nameLineEdit, 0, 1);
gridLayout->addWidget(emailLabel, 1, 0);
gridLayout->addWidget(emailLineEdit, 1, 1);
gridLayout->addWidget(ageLabel, 2, 0);
gridLayout->addWidget(ageSpinBox, 2, 1);
setLayout(gridLayout);
The table below shows the default appearance in different styles.
QCommonStyle derived styles (except QPlastiqueStyle)QMacStyleQPlastiqueStyleQt Extended styles
Traditional style used for Windows, GNOME, and earlier versions of KDE. Labels are left aligned, and expanding fields grow to fill the available space. (This normally corresponds to what we would get using a two-column QGridLayout.) Style based on the Mac OS X Aqua guidelines. Labels are right-aligned, the fields don't grow beyond their size hint, and the form is horizontally centered. Recommended style for KDE applications. Similar to MacStyle, except that the form is left-aligned and all fields grow to fill the available space. Default style for Qt Extended styles. Labels are right-aligned, expanding fields grow to fill the available space, and row wrapping is enabled for long lines.
The form styles can be also be overridden individually by calling setLabelAlignment(), setFormAlignment(), setFieldGrowthPolicy(), and setRowWrapPolicy(). For example, to simulate the form layout appearance of QMacStyle on all platforms, but with left-aligned labels, you could write:
formLayout->setRowWrapPolicy(QFormLayout::DontWrapRows);
formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
formLayout->setFormAlignment(Qt::AlignHCenter | Qt::AlignTop);
formLayout->setLabelAlignment(Qt::AlignLeft);
See also QGridLayout, QBoxLayout, and QStackedLayout.
This enum specifies the different policies that can be used to control the way in which the form's fields grow.
See also fieldGrowthPolicy.
This enum specifies the different policies that can be used to control the way in which the form's rows wrap.
See also rowWrapPolicy.
|
protected |
QtGui.QFormLayout.QFormLayout | ( | QWidget | parent = null | ) |
Constructs a new form layout with the given parent widget.
See also QWidget::setLayout().
|
virtual |
Reimplemented from QLayout::addItem().
Implements QtGui.QLayout.
new void QtGui.QFormLayout.AddRow | ( | QWidget | widget | ) |
This is an overloaded function.
Adds the specified widget at the end of this form layout. The widget spans both columns.
new void QtGui.QFormLayout.AddRow | ( | QLayout | layout | ) |
This is an overloaded function.
Adds the specified layout at the end of this form layout. The layout spans both columns.
Adds a new row to the bottom of this form layout, with the given label and field.
See also insertRow().
new void QtGui.QFormLayout.AddRow | ( | string | labelText, |
QWidget | field | ||
) |
new void QtGui.QFormLayout.AddRow | ( | string | labelText, |
QLayout | field | ||
) |
This is an overloaded function.
This overload automatically creates a QLabel behind the scenes with labelText as its text.
|
virtual |
Reimplemented from QtCore.QObject.
new void QtGui.QFormLayout.Dispose | ( | ) |
new void QtGui.QFormLayout.GetItemPosition | ( | int | index, |
ref int | rowPtr, | ||
QFormLayout.ItemRole | rolePtr | ||
) |
Retrieves the row and role (column) of the item at the specified index. If index is out of bounds, *rowPtr is set to -1; otherwise the row is stored in *rowPtr and the role is stored in *rolePtr.
See also itemAt(), count(), getLayoutPosition(), and getWidgetPosition().
new void QtGui.QFormLayout.GetLayoutPosition | ( | QLayout | layout, |
ref int | rowPtr, | ||
QFormLayout.ItemRole | rolePtr | ||
) |
Retrieves the row and role (column) of the specified child layout. If layout is not in the form layout, *rowPtr is set to -1; otherwise the row is stored in *rowPtr and the role is stored in *rolePtr.
new void QtGui.QFormLayout.GetWidgetPosition | ( | QWidget | widget, |
ref int | rowPtr, | ||
QFormLayout.ItemRole | rolePtr | ||
) |
Retrieves the row and role (column) of the specified widget in the layout. If widget is not in the layout, *rowPtr is set to -1; otherwise the row is stored in *rowPtr and the role is stored in *rolePtr.
See also getItemPosition() and itemAt().
|
virtual |
Reimplemented from QLayoutItem::heightForWidth().
Reimplemented from QtGui.QLayout.
new void QtGui.QFormLayout.InsertRow | ( | int | row, |
QWidget | widget | ||
) |
This is an overloaded function.
Inserts the specified widget at position row in this form layout. The widget spans both columns. If row is out of bounds, the widget is added at the end.
new void QtGui.QFormLayout.InsertRow | ( | int | row, |
QLayout | layout | ||
) |
This is an overloaded function.
Inserts the specified layout at position row in this form layout. The layout spans both columns. If row is out of bounds, the widget is added at the end.
Inserts a new row at position row in this form layout, with the given label and field. If row is out of bounds, the new row is added at the end.
See also addRow().
This is an overloaded function.
new void QtGui.QFormLayout.InsertRow | ( | int | row, |
string | labelText, | ||
QWidget | field | ||
) |
new void QtGui.QFormLayout.InsertRow | ( | int | row, |
string | labelText, | ||
QLayout | field | ||
) |
This is an overloaded function.
This overload automatically creates a QLabel behind the scenes with labelText as its text.
|
virtual |
Reimplemented from QLayoutItem::invalidate().
Reimplemented from QtGui.QLayout.
|
virtual |
Reimplemented from QLayout::itemAt().
Implements QtGui.QLayout.
new IQLayoutItem QtGui.QFormLayout.ItemAt | ( | int | row, |
QFormLayout.ItemRole | role | ||
) |
Returns the layout item in the given row with the specified role (column). Returns 0 if there is no such item.
See also QLayout::itemAt() and setItem().
Returns the label associated with the given field.
See also itemAt().
new void QtGui.QFormLayout.SetItem | ( | int | row, |
QFormLayout.ItemRole | role, | ||
IQLayoutItem | item | ||
) |
Sets the item in the given row for the given role to item, extending the layout with empty rows if necessary.
If the cell is already occupied, the item is not inserted and an error message is sent to the console. The item spans both columns.
Warning: Do not use this function to add child layouts or child widget items. Use setLayout() or setWidget() instead.
See also setLayout().
new void QtGui.QFormLayout.SetLayout | ( | int | row, |
QFormLayout.ItemRole | role, | ||
QLayout | layout | ||
) |
Sets the sub-layout in the given row for the given role to layout, extending the form layout with empty rows if necessary.
If the cell is already occupied, the layout is not inserted and an error message is sent to the console.
Note: For most applications, addRow() or insertRow() should be used instead of setLayout().
See also setWidget().
new void QtGui.QFormLayout.SetWidget | ( | int | row, |
QFormLayout.ItemRole | role, | ||
QWidget | widget | ||
) |
Sets the widget in the given row for the given role to widget, extending the layout with empty rows if necessary.
If the cell is already occupied, the widget is not inserted and an error message is sent to the console.
Note: For most applications, addRow() or insertRow() should be used instead of setWidget().
See also setLayout().
|
virtual |
Reimplemented from QLayout::takeAt().
Implements QtGui.QLayout.
|
static |
|
static |
|
static |
|
static |
|
get |
Reimplemented from QLayout::count().
|
getprotected |
|
get |
Reimplemented from QLayoutItem::expandingDirections().
|
getset |
This property holds the way in which the form's fields grow.
The default value depends on the widget or application style. For QMacStyle, the default is FieldsStayAtSizeHint; for QCommonStyle derived styles (like Plastique and Windows), the default is ExpandingFieldsGrow; for Qt Extended styles, the default is AllNonFixedFieldsGrow.
If none of the fields can grow and the form is resized, extra space is distributed according to the current form alignment.
|
getset |
This property holds the alignment of the form layout's contents within the layout's geometry.
The default value depends on the widget or application style. For QMacStyle, the default is Qt::AlignHCenter | Qt::AlignTop; for the other styles, the default is Qt::AlignLeft | Qt::AlignTop.
|
getset |
Reimplemented from QLayoutItem::setGeometry().
|
get |
Reimplemented from QLayoutItem::hasHeightForWidth().
|
getset |
This property holds the spacing between widgets that are laid out side by side.
By default, if no value is explicitly set, the layout's horizontal spacing is inherited from the parent layout, or from the style settings for the parent widget.
|
getset |
This property holds the horizontal alignment of the labels.
The default value depends on the widget or application style. For QCommonStyle derived styles, except for QPlastiqueStyle, the default is Qt::AlignLeft; for the other styles, the default is Qt::AlignRight.
|
get |
Reimplemented from QLayoutItem::minimumSize().
|
get |
Returns the number of rows in the form.
See also QLayout::count().
|
getset |
This property holds the way in which the form's rows wrap.
The default value depends on the widget or application style. For Qt Extended styles and QS60Style, the default is WrapLongRows; for the other styles, the default is DontWrapRows.
If you want to display each label above its associated field (instead of next to it), set this property to WrapAllRows.
|
get |
Reimplemented from QLayoutItem::sizeHint().
|
getset |
If the vertical spacing is equal to the horizontal spacing, this function returns that value; otherwise it returns -1.
This function sets both the vertical and horizontal spacing to spacing.
|
staticget |
|
getset |
This property holds the spacing between widgets that are laid out vertically.
By default, if no value is explicitly set, the layout's vertical spacing is inherited from the parent layout, or from the style settings for the parent widget.