Answer the question
In order to leave comments, you need to log in
Why is a method called from an inherited class in Qt?
class MyClass : public QThread
{
MyClass(unsigned long ms) { time = ms; start();}
void run(){ while(true) { cycle();msleep(time);}}
void cycle() { qDebug() << "Hello MyClass";}
private:
unsigned logn time;
}
class MyClass2 : public MyClass
{
MyClass2() : MyClass(100) {}
void cycle() { qDebug() << "cycle...";}
}
Answer the question
In order to leave comments, you need to log in
You would write how and what you call, what you get and what you want to get. Without it, the answer is "Because".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question