QPixmap use the other overload which returns QPixmap by-value
(cherry picked from commit 65ff17441628e20c4890f806d02f53647b9e1277)
This commit is contained in:
committed by
borgmanJeremy
parent
a5c68a6f5b
commit
d3140a9ad6
@@ -116,12 +116,24 @@ void CaptureLauncher::startDrag()
|
||||
{
|
||||
QDrag* dragHandler = new QDrag(this);
|
||||
QMimeData* mimeData = new QMimeData;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
mimeData->setImageData(m_imageLabel->pixmap(Qt::ReturnByValue));
|
||||
#else
|
||||
mimeData->setImageData(m_imageLabel->pixmap());
|
||||
#endif
|
||||
dragHandler->setMimeData(mimeData);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
dragHandler->setPixmap(
|
||||
m_imageLabel->pixmap(Qt::ReturnByValue)
|
||||
.scaled(
|
||||
256, 256, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation));
|
||||
dragHandler->exec();
|
||||
#else
|
||||
dragHandler->setPixmap(m_imageLabel->pixmap()->scaled(
|
||||
256, 256, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation));
|
||||
dragHandler->exec();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CaptureLauncher::connectCaptureSlots()
|
||||
|
||||
Reference in New Issue
Block a user