View Full Version : Subclass
merry
1st March 2007, 11:18
Hi all
I am new to Qt3.1(Linux OS). Can anybody Explain How to use the Subclass with an Example.
Thanx
Merry
wysota
1st March 2007, 11:24
This has nothing to do with Qt.
Here is a link to a good C++ book: http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
and a simple example:
class A {
public:
virtual void methodA(){ std::cout << "Method A::A" << std::endl; }
};
class B : public class A {
public:
void methodA(){ std::cout << "Method B::A" << std::endl; }
};
B is a subclass of A and reimplements a virtual method "methodA".
BTW. This is related to this thread (http://www.qtcentre.org/forum/f-qt-programming-2/t-replacement-of-images-5835.html).
merry
1st March 2007, 11:34
Yaa after sending you the new thread I Viewed that solution .
Thanx
Merry
Powered by vBulletin® Version 4.2.5 Copyright © 2023 vBulletin Solutions Inc. All rights reserved.