error: no matching function for call to ‘QDrag::QDrag(QWidget*)’
QDrag Problems
Apps that have drop and drag functionality will need some tweaking. A line such as
QDrag *drag = new QDrag(event->widget());
in Qt 5 will generate the error
error: no matching function for call to 'QDrag::QDrag(QWidget*)'
To fix this add among the includes:
#include <QWidget>
QDrag问题
具有拖放功能的应用程序需要进行一些调整。 一条线如
QDrag *drag = new QDrag(event->widget());
在Qt 5中会产生错误
错误:没有匹配的函数来调用“ QDrag :: QDrag(QWidget *)”
要解决此问题,请在以下内容中添加:
#include <QWidget>
报错:
F:\qt\project_text\untitled21\myitem.cpp:49: error: no matching function for call to 'QDrag::QDrag(QWidget*)'