void Frame::mousePressEvent(QMouseEvent *Ae)
{
if (Ae->button() == Qt::LeftButton) {
QDrag *drag = new QDrag(this);
QMimeData *mimeData = new QMimeData;
drag->setMimeData(mimeData);
QPixmap p = QPixmap::grabWidget(this);
drag->setPixmap(p);
drag->exec();
}
}
but reflash the ui many times, when I destroy the Frame,but it still in drag->exec(), and the then it crash,so what should I do ?
Bookmarks