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,12 +1,12 @@
|
|||
import unittest
|
||||
|
||||
import py3kcompat as py3k
|
||||
from helper import UsesQApplication
|
||||
from PySide.QtCore import QSize
|
||||
from PySide.QtGui import QBitmap, QImage, QLabel
|
||||
from PySide.QtGui import QBitmap, QImage
|
||||
|
||||
class TestQBitmap(UsesQApplication):
|
||||
def testFromDataMethod(self):
|
||||
dataBits = '\x38\x28\x38\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\xfe\xfe\x7c\x7c\x38\x38\x10\x10'
|
||||
dataBits = py3k.b('\x38\x28\x38\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\xfe\xfe\x7c\x7c\x38\x38\x10\x10')
|
||||
bim = QBitmap.fromData(QSize(8, 48), dataBits, QImage.Format_Mono) # missing function
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue