Ricardo_arg
30th June 2009, 06:39
Hi, i am new in qt4, i am converting a program that i was develop a few timne ago, and i am having problem now when subclassing a class that a was develop before.
#include <QObject>
class a : public QObject
{
public:
a();
Q_OBJECT
QString get_b(){return b}:
private:
QString b;
}
now when i am tryng to use class a
//======================
include "a.h"
class b: public a
{
public:
b();
set_a();//error "b is private from this context"!!!!!!
private:
QList<a> list;//error in compiler
}
//===================================
a little help will awesome
thx!
#include <QObject>
class a : public QObject
{
public:
a();
Q_OBJECT
QString get_b(){return b}:
private:
QString b;
}
now when i am tryng to use class a
//======================
include "a.h"
class b: public a
{
public:
b();
set_a();//error "b is private from this context"!!!!!!
private:
QList<a> list;//error in compiler
}
//===================================
a little help will awesome
thx!