diff options
Diffstat (limited to 'examples/declarative/usingmodel.py')
-rw-r--r-- | examples/declarative/usingmodel.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/usingmodel.py b/examples/declarative/usingmodel.py index 494647c10..4b4387117 100644 --- a/examples/declarative/usingmodel.py +++ b/examples/declarative/usingmodel.py @@ -44,9 +44,9 @@ from __future__ import print_function import os import sys -from PySide2.QtCore import QAbstractListModel, Qt, QUrl -from PySide2.QtGui import QGuiApplication import PySide2.QtQml +from PySide2.QtCore import QAbstractListModel, Qt, QUrl, QByteArray +from PySide2.QtGui import QGuiApplication from PySide2.QtQuick import QQuickView class PersonModel (QAbstractListModel): @@ -58,8 +58,8 @@ class PersonModel (QAbstractListModel): def roleNames(self): roles = { - PersonModel.MyRole : 'modelData', - Qt.DisplayRole : 'display' + PersonModel.MyRole : QByteArray(b'modelData'), + Qt.DisplayRole : QByteArray(b'display') } return roles |