위젯 튜토리얼 - 자식 위젯
이전 예제에서 생성한 창에, 생성자에서 ` window `를 부모로 전달하여 자식 위젯을 추가할 수 있습니다. 이 예제에서는 창에 버튼을 추가하고 특정 위치에 배치합니다.
|
![]() |
이제 이 버튼은 창의 자식 위젯이 되었으며, 창이 소멸될 때 함께 삭제됩니다. 창을 숨기거나 닫는다고 해서 창이 자동으로 소멸되는 것은 아닙니다. 예제가 종료될 때 비로소 창이 소멸됩니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
