Auto status change to "Under Review"
@@ -14,6 +14,8 | |||
|
14 | 14 | |
|
15 | 15 | Q_LOGGING_CATEGORY(LOG_VisualizationDragDropContainer, "VisualizationDragDropContainer") |
|
16 | 16 | |
|
17 | auto DRAGGED_MINIATURE_WIDTH = 200; // in pixels | |
|
18 | ||
|
17 | 19 | struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate { |
|
18 | 20 | |
|
19 | 21 | QVBoxLayout *m_Layout; |
@@ -183,14 +185,14 void VisualizationDragDropContainer::startDrag(VisualizationDragWidget *dragWidg | |||
|
183 | 185 | |
|
184 | 186 | // Note: The management of the drag object is done by Qt |
|
185 | 187 | auto drag = new QDrag{dragWidget}; |
|
186 | drag->setHotSpot(dragPosition); | |
|
187 | 188 | |
|
188 | 189 | auto mimeData = dragWidget->mimeData(); |
|
189 | 190 | drag->setMimeData(mimeData); |
|
190 | 191 | |
|
191 | 192 | auto pixmap = QPixmap(dragWidget->size()); |
|
192 | 193 | dragWidget->render(&pixmap); |
|
193 | drag->setPixmap(pixmap); | |
|
194 | drag->setPixmap(pixmap.scaled(DRAGGED_MINIATURE_WIDTH, DRAGGED_MINIATURE_WIDTH, | |
|
195 | Qt::KeepAspectRatio, Qt::SmoothTransformation)); | |
|
194 | 196 | |
|
195 | 197 | auto image = pixmap.toImage(); |
|
196 | 198 | mimeData->setImageData(image); |
General Comments 1
You need to be logged in to leave comments.
Login now