#include <QSharedDataPointer>
class CMainwidgetData;
class CMainwidget
{
public:
CMainwidget();
CMainwidget(const CMainwidget &);
CMainwidget &operator=(const CMainwidget &);
~CMainwidget();
private:
QSharedDataPointer<CMainwidgetData> data;
};
class CMainwidgetData : public QSharedData
{
public:
};
CMainwidget::CMainwidget() : data(new CMainwidgetData)
{
}
CMainwidget::CMainwidget(const CMainwidget &rhs) : data(rhs.data)
{
}
CMainwidget &CMainwidget::operator=(const CMainwidget &rhs)
{
if (this != &rhs)
data.operator=(rhs.data);
return *this;
}
CMainwidget::~CMainwidget()
{
}