Port deprecated QPixmap::grabWidget() -> QWidget::grab()

parent 03cb0e46
......@@ -141,6 +141,6 @@ void KUIViewer::takeScreenshot(const QString& filename, int w, int h)
setAutoSaveSettings(QStringLiteral("MainWindow"), false);
}
QPixmap pixmap = QPixmap::grabWidget(m_part->widget());
const QPixmap pixmap = m_part->widget()->grab();
pixmap.save(filename, "PNG");
}
......@@ -208,8 +208,8 @@ void KUIViewerPart::slotGrab()
return;
}
QClipboard* clipboard = QApplication::clipboard();
clipboard->setPixmap(QPixmap::grabWidget(m_widget));
const QPixmap pixmap = m_widget->grab();
QApplication::clipboard()->setPixmap(pixmap);
}
#include "kuiviewer_part.moc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment