KDEUI
Go to the documentation of this file.
21 #include <QtCore/QEvent>
22 #include <QtGui/QApplication>
23 #include <QtGui/QHBoxLayout>
24 #include <QtGui/QVBoxLayout>
30 QHBoxLayout* layout =
new QHBoxLayout(
this );
31 layout->setSpacing( 0 );
32 layout->setMargin( 0 );
42 QVBoxLayout* layout =
new QVBoxLayout(
this );
43 layout->setSpacing( 0 );
44 layout->setMargin( 0 );
55 switch ( event->type() ) {
56 case QEvent::ChildAdded:
58 QChildEvent*
childEvent =
static_cast<QChildEvent *
>( event );
59 if ( childEvent->child()->isWidgetType() ) {
61 static_cast<QBoxLayout *
>( layout() )->addWidget( widget );
66 case QEvent::ChildRemoved:
68 QChildEvent*
childEvent =
static_cast<QChildEvent *
>( event );
69 if ( childEvent->child()->isWidgetType() ) {
71 static_cast<QBoxLayout *
>( layout() )->removeWidget( widget );
85 QApplication::sendPostedEvents( that, QEvent::ChildAdded );
93 QApplication::sendPostedEvents( that, QEvent::ChildAdded );
100 layout()->setSpacing( spacing );
110 layout()->setMargin( margin );
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 20:33:56 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.