summaryrefslogtreecommitdiffstats
path: root/examples/itemviews/puzzle/piecesmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/itemviews/puzzle/piecesmodel.cpp')
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp
index e110cf1..e55663b 100644
--- a/examples/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/itemviews/puzzle/piecesmodel.cpp
@@ -124,7 +124,7 @@ QMimeData *PiecesModel::mimeData(const QModelIndexList &indexes) const
foreach (QModelIndex index, indexes) {
if (index.isValid()) {
- QPixmap pixmap = qVariantValue<QPixmap>(data(index, Qt::UserRole));
+ QPixmap pixmap = qvariant_cast<QPixmap>(data(index, Qt::UserRole));
QPoint location = data(index, Qt::UserRole+1).toPoint();
stream << pixmap << location;
}