Qt 4.8
Classes | Functions
qboxlayout.cpp File Reference
#include "qboxlayout.h"
#include "qapplication.h"
#include "qwidget.h"
#include "qlist.h"
#include "qsizepolicy.h"
#include "qvector.h"
#include "qlayoutengine_p.h"
#include "qlayout_p.h"

Go to the source code of this file.

Classes

struct  QBoxLayoutItem
 
class  QBoxLayoutPrivate
 

Functions

static bool checkWidget (QLayout *layout, QWidget *widget)
 
static bool horz (QBoxLayout::Direction dir)
 

Function Documentation

◆ checkWidget()

static bool checkWidget ( QLayout layout,
QWidget widget 
)
static

Definition at line 58 of file qboxlayout.cpp.

Referenced by QBoxLayout::insertWidget().

59 {
60  if (!widget) {
61  qWarning("QLayout: Cannot add null widget to %s/%s", layout->metaObject()->className(),
62  layout->objectName().toLocal8Bit().data());
63  return false;
64  }
65  return true;
66 }
char * data()
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:429
Q_CORE_EXPORT void qWarning(const char *,...)
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
Definition: qstring.cpp:4049
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491
QString objectName() const
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.

◆ horz()

static bool horz ( QBoxLayout::Direction  dir)
inlinestatic