Hi, I need to do something like this:
Qt Code:
class Apple { private: QPointer<Tree> m_tree; public: Tree &tree(); } Tree &Apple::tree() { return m_tree; }To copy to clipboard, switch view to plain text mode
But the compiler says this for the line 'return m_tree':
error C2440: 'return' : cannot convert from 'QPointer<T>' to 'Tree &'
How to change the line to make it work?
Thanks.




Reply With Quote

Bookmarks