Updated QtDeclarative modue to works with python 2.x and 3.x
This commit is contained in:
parent
1e29ab6592
commit
75843bf45a
4 changed files with 5 additions and 7 deletions
|
|
@ -9,5 +9,5 @@ view.resize(200, 200)
|
|||
item = view.itemAt(100, 100)
|
||||
|
||||
# it CAN NOT crash here
|
||||
print item
|
||||
print(item)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class TestQDeclarativeView(TimedQApplication):
|
|||
|
||||
|
||||
def testModelExport(self):
|
||||
print "TEST"
|
||||
view = QDeclarativeView()
|
||||
dataList = [MyObject("Item 1"), MyObject("Item 2"), MyObject("Item 3"), MyObject("Item 4")]
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class PieChart (QDeclarativeItem):
|
|||
|
||||
def __init__(self, parent = None):
|
||||
QDeclarativeItem.__init__(self, parent)
|
||||
self._name = u''
|
||||
self._name = ''
|
||||
self._slices = []
|
||||
|
||||
def getName(self):
|
||||
|
|
@ -59,7 +59,7 @@ class PieChart (QDeclarativeItem):
|
|||
def setName(self, value):
|
||||
self._name = value
|
||||
|
||||
name = Property(unicode, getName, setName)
|
||||
name = Property(str, getName, setName)
|
||||
|
||||
def appendSlice(self, _slice):
|
||||
global appendCalled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue