Qt一个类中调用另一个类的函数
#include "stdafx.h"
class A
{
public:
int it;
A():it(100)
{
}
};
class B
{
public:
A a;
int getvalue();
protected:
private:
};
int B::getvalue()
{
return a.it;
}
int _tmain(int argc, _TCHAR* argv[])
{
B b;
int kk = b.getvalue();
return 0;
}
类似如上的调用在Qt中可以应用吗?为什么我在Qt中实现不了呢,高手指点