Updated QtGui modue to works with python 2.x and 3.x
This commit is contained in:
parent
edaefbce48
commit
d9dd319232
15 changed files with 94 additions and 71 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import unittest
|
||||
from PySide.QtCore import *
|
||||
from PySide.QtGui import *
|
||||
import py3kcompat as py3k
|
||||
from PySide.QtGui import QStandardItemModel, QStandardItem
|
||||
|
||||
class MyItemModel(QStandardItemModel):
|
||||
def __init__(self,parent=None):
|
||||
|
|
@ -9,12 +9,12 @@ class MyItemModel(QStandardItemModel):
|
|||
|
||||
def mimeTypes(self):
|
||||
mtypes = super(MyItemModel,self).mimeTypes()
|
||||
mtypes.append(u'application/my-form')
|
||||
mtypes.append(py3k.unicode_('application/my-form'))
|
||||
return mtypes
|
||||
|
||||
def mimeData(self,indexes):
|
||||
self.__mimedata = super(MyItemModel,self).mimeData(indexes)
|
||||
self.__mimedata.setData(u'application/my-form', 'hi')
|
||||
self.__mimedata.setData(py3k.unicode_('application/my-form'), 'hi')
|
||||
return self.__mimedata
|
||||
|
||||
class TestBug660(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue