다음과 같이가는 Qt를 개발 책의 foudations의 문이있다 :C++ 생성자와 Qt를
우리가: QObject(parent)
을 둘 때 의미가 무엇 MyClass::MyClass(const string& test, QObject *parent) : QObject(parent)
?
감사합니다.
다음과 같이가는 Qt를 개발 책의 foudations의 문이있다 :C++ 생성자와 Qt를
우리가: QObject(parent)
을 둘 때 의미가 무엇 MyClass::MyClass(const string& test, QObject *parent) : QObject(parent)
?
감사합니다.
두 개의 생성자 선언이 없다고 확신합니까? : QObject(parent)
은 초기화 프로그램 목록입니다. 기본 클래스 QObject
을 QObject::QObject(QObject*)
생성자로 초기화하고 있습니다.
다른 개체를 부모로 사용하여 QObject를 만들면 부모 개체의 children() 목록에 추가되고 부모 개체 일 때 삭제됩니다. 요컨대
이 MyClass
가 QObject
http://www.cplusplus.com/doc/tutorial/inheritance/
http://www.anyexample.com/programming/cplusplus/cplusplus_inheritance_example.xml
에서 속성 (및 방법)을 따라서 MyClass
가 QObject