Answer the question
In order to leave comments, you need to log in
Is it worth it to make a base class in this case and inherit from it?
In general, there are several form classes in Qt like:
//Главное окно
class MainWindow : public QMainWindow
{
//
private:
//
int m, n;
double **data, scaleX, scaleY;
}
//И много других форм, открываемых из главной формы - MainWindow
class OtherWindow : public QMainWindow
{
//
private:
//
int m, n;
double **data, scaleX, scaleY;
}
int m, n; double **data, scaleX, scaleY;
it worth making a base class (from the point of view of OOP), from which these fields will be inherited or not? What do you think?
Answer the question
In order to leave comments, you need to log in
Make it protected on the underlying MainWindow and those fields will be inherited. And why even a separate class for three members?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question