Reputation: 1636
I have created a class in Qt that has a number of public properties lets say
class items
{
public:
QString name;
QString description;
How can I create a new class that inherits all the variables and methods from this class?
Upvotes: 1
Views: 283
Reputation: 318
Your question is about c++ not Qt. You can search c++ documents to learn about c++ inheritance.
You can inherit another class in this way:
class myClass : public items
{
myClass() : Item()
{
//
}
}
Upvotes: 0