Simpler way of extracting types from QByteArray

Simpler way of extracting bytes from QByteArray
This commit is contained in:
Ogi 2019-05-25 00:21:37 -07:00
parent 957aab008c
commit c69e04db2d

View File

@ -190,12 +190,7 @@ def _generateItemSvg(item, nodes=None, root=None, options={}):
## this is taken care of in generateSvg instead. ## this is taken care of in generateSvg instead.
#if hasattr(item, 'setExportMode'): #if hasattr(item, 'setExportMode'):
#item.setExportMode(False) #item.setExportMode(False)
doc = xml.parseString(arr.data())
if QT_LIB in ['PySide', 'PySide2']:
xmlStr = str(arr)
else:
xmlStr = bytes(arr).decode('utf-8')
doc = xml.parseString(xmlStr.encode('utf-8'))
try: try:
## Get top-level group for this item ## Get top-level group for this item