Hi all, so I have a C++ question I can't seem to solve. I come from a Java background but am fairly familiar with C/C++. I have a class I'd like to inherit from:
(Not the full header but the meat of it is there, I did not write this and can not change it)
Code:
namespace bb {
namespace cascades {
class AbstractPanePrivate;
class QT_CASCADES_EXPORT AbstractPane : public UIObject {
Q_OBJECT
public:
virtual ~AbstractPane();
protected:
/*! \cond PRIVATE */
explicit AbstractPane(AbstractPanePrivate &_d_ptr);
/*! \endcond */
private:
Q_DECLARE_PRIVATE(AbstractPane)
Q_DISABLE_COPY(AbstractPane)
/*! \cond PRIVATE */
typedef AbstractPane ThisClass;
typedef UIObject BaseClass;
/*! \endcond */
};
}
}
What I'd like to do is inherit from it but when I try my compiler tells me there's no "no matching function for call". Okay, understandable it's right, there is no matching function. So how exactly do I go about accomplishing this? Also, what is the reason this class was constructed this way, what is the advantage?
Here is a partial header for a class that does successfully inherit from AbstractPane so I know it's possible somehow.
(Again I did not write this, and do not have access to cpp)
Code:
namespace bb {
namespace cascades {
class NavigationPanePrivate;
class QT_CASCADES_EXPORT NavigationPane : public AbstractPane {
private:
Q_OBJECT
Q_PROPERTY(QDeclarativeListProperty<bb::cascades::AbstractPane> stack READ stack FINAL)
Q_CLASSINFO("DefaultProperty", "stack")
Q_PROPERTY(bb::cascades::AbstractPane* top READ top NOTIFY topChanged FINAL)
Q_PROPERTY(bool backButtonsVisible READ backButtonsVisible WRITE setBackButtonsVisible
RESET resetBackButtonsVisible NOTIFY backButtonsVisibleChanged FINAL)
public:
explicit NavigationPane();
virtual ~NavigationPane();
bb::cascades::AbstractPane* top() const;
private:
/*! @cond PRIVATE */
Q_DECLARE_PRIVATE(NavigationPane)
Q_DISABLE_COPY(NavigationPane)
typedef NavigationPane ThisClass;
typedef AbstractPane BaseClass;
/*! @endcond */
};
}
}