
Originally Posted by
wysota
Why not? You don't have to cast it to QMovie* to use it...
But you will have to implement every method, so there is no benefit in using QMovie.
#include <iostream>
class A
{
public:
void foo() { bar(); }
void bar() { std::cerr << "A::bar()" << std::endl; }
};
class B : public A
{
public:
void bar() { std::cerr << "B::bar()" << std::endl; }
};
int main()
{
B b;
b.foo();
b.bar();
return 0;
}
#include <iostream>
class A
{
public:
void foo() { bar(); }
void bar() { std::cerr << "A::bar()" << std::endl; }
};
class B : public A
{
public:
void bar() { std::cerr << "B::bar()" << std::endl; }
};
int main()
{
B b;
b.foo();
b.bar();
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks