2021-01-09


#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()
{

}

上一篇:Oracle PL/SQL 存储过程、函数、包 的范例


下一篇:使用matlab求解线性方程