The QChildEvent class contains event parameters for child object events. 更多...
| 头: | #include <QChildEvent> | 
| qmake: | QT += core | 
| 继承: | QEvent | 
| QChildEvent (QEvent::Type type , QObject * child ) | |
| bool | added () const | 
| QObject * | child () const | 
| bool | polished () const | 
| bool | removed () const | 
| QObject * | c | 
The QChildEvent class contains event parameters for child object events.
子级事件会被立即发送给对象,当子级被添加 (或移除) 时。
						在这两种情况下,依赖的子级只能是
						
							QObject
						
						(或者,若
						
							QObject::isWidgetType
						
						() 返回
						
true
						
						,
						
							QWidget
						
						)。这是因为在
						
							QEvent::ChildAdded
						
						情况下,子级尚未被完全构造;在
						
							QEvent::ChildRemoved
						
						情况下,它可能已被销毁。
					
这些事件的处理程序是 QObject::childEvent ().
构造子级事件对象为特定 type 为 child .
type 可以是 QEvent::ChildAdded , QEvent::ChildRemoved ,或 QEvent::ChildPolished .
另请参阅 child ().
						返回
						
true
						
						if
						
							type
						
						() 是
						
							QEvent::ChildAdded
						
						;否则返回 false。
					
返回被添加 (或移除) 的子级对象。
						返回
						
true
						
						if
						
							type
						
						() 是
						
							QEvent::ChildPolished
						
						;否则返回 false。
					
						返回
						
true
						
						if
						
							type
						
						() 是
						
							QEvent::ChildRemoved
						
						;否则返回 false。