This has nothing to do with Qt. If you are writing in C++, it is a C++ question and you should look up C++ inheritance.
If what you are asking is this kind of subclassing:
Qt Code:
class B { // ... }; class A : public B { // ... };To copy to clipboard, switch view to plain text mode
and you mean B needs to know about methods that are defined only in A, then how is this supposed to work? If you create an instance of class B and try to cast it to "A" and use A methods, your code will probably crash when you try to call A methods because an instance of B is not an instance of A even if you force the code to treat it that way.
Maybe you should show some of your code where you are trying to do what you want, because the way I understand your question it doesn't make any sense.
Bookmarks