com.trolltech.qt.core
Class QChildEvent
java.lang.Object
com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QEvent
com.trolltech.qt.core.QChildEvent
- All Implemented Interfaces:
- QtJambiInterface
public class QChildEvent
- extends QEvent
The QChildEvent
class contains event parameters for child object events. Child events are sent immediately to objects when children are added or removed.
In both cases you can only rely on the child being a QObject
(or, if QObject::isWidgetType()
returns true, a QWidget
). This is because in the QEvent::ChildAdded
case the child is not yet fully constructed; in the QEvent::ChildRemoved
case it might have already been destructed.
The handler for these events is QObject::childEvent()
.
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent |
QEvent.Type |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
currentSender |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QChildEvent
public QChildEvent(QEvent.Type type,
QObject child)
- Constructs a child event object of a particular type for the child.
type can be QEvent::ChildAdded
, QEvent::ChildRemoved
, QEvent::ChildPolished
, or QEvent::ChildRemoved
.
- See also:
child()
.
added
public final boolean added()
- Returns true if
type()
is QEvent::ChildAdded
; otherwise returns false.
child
public final QObject child()
- Returns the child object that was added or removed.
polished
public final boolean polished()
- Returns true if
type()
is QEvent::ChildPolished
; otherwise returns false.
removed
public final boolean removed()
- Returns true if
type()
is QEvent::ChildRemoved
; otherwise returns false.
toString
public java.lang.String toString()
- Returns a string representation of the this QChildEvent.
- Overrides:
toString
in class QEvent