Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Inheritance issue not direct base of.

$
0
0
I have been looking through the documentation of Qt and have not been able to find information about direct inheritance of a Qt Class, I have found information about multiple inheritance. Perhaps someone can clear this up. In the documentation QObject—>QMediaObject—>QCamera—>MyOwnCamera That is I am trying to inherit the QCamera. class MyOwnCamera :public QCamera {   Q_OBJECT     Q_INVOKABLE void StartCamera()   {      qDebug() << "Camera start has been signaled";   }   public:   explicit MyOwnCamera(QObject* parent = 0);   signals:   public slots:     void CameraActivation()   {     qDebug() << "Camera has been signaled";   }   };   MyOwnCamera::MyOwnCamera(QObject* parent) :   QObject(parent) {   } Resulting in QObject is not a direct base of MyOwnCamera, which is true. I have found this but according to this I would have to modify the QCamera ? http://qt-project.org/forums/viewthread/7062 Is there anyway around this ? I figure I am probably supposed to use multiple inheritance or object composition I guess? Thanks. [added code markup, Tobias]

Viewing all articles
Browse latest Browse all 4972

Trending Articles