Inheriting class members (Qt C++, QApplication class)
I have done a few small things with Qt and last week I decide I was going to try to do some serious Qt programming to get a better feel for how it all works. I have succesfully made my own widgets extending the QWidget class.
I am trying to write a new class call wirelessApp. It is an extension of QApplication.
I have no constructor so I assumed it would inherit the constructor from QApplication yet I get the following error when I make an instance of this class:
wirelessapp.h:27: base `QApplication' with only non-default constructor in class without a constructor
Usually when you create an instance of QApplication you would do something like this:
QApplication myApp(argc, argv) ;
Passing in the argc and argv from the main function (ie the command line options) because there are some common command line options that work in every Qt program. Now on mine I have a class that is declared:class wirelessApp : public QApplication
To get an instance of that I assumed wirelessApp wApp(argc,argv); would invoke the same constructor and I could then be free to use the new functionality I added to this particular class as well as all the functions from QApplication. However the compiler error is really confusing me, any ideas?