抱歉我的英文。我有一些课。
class AdaptedWidget: public QWidget
{
Q_OBJECT
public:
AdaptedWidget(AdaptedWidget *parent = 0) {nothing}
bool event(QEvent *event);
};
bool WindowManager::eventFilter(QObject *target, QEvent *event)
{
auto window = qobject_cast<AdaptedWidget*>(target);
**auto windowSharedPtr = std::make_shared<AdaptedWidget>(window);** //Error
...
我需要从AdaptedWidget *智能指针创建。我需要覆盖复制构造函数?或者是执法类型中的问题?