Re: [PyQt] QPixmap.loadFromData()

2013-01-28 Thread paolo
Il 2013-01-28 15:11 Hans-Peter Jansen ha scritto: try this: print("Load", pix.loadFromData(QByteArray(ba), "PNG")) I've tryed already this but with no success. >ba< is already a QByteArray BUT different from what i've store and i don't know why. As i've replyed before i can on

Re: [PyQt] QPixmap.loadFromData()

2013-01-28 Thread Hans-Peter Jansen
Am Freitag, 25. Januar 2013, 00:41:04 schrieb pa...@paolodestefani.it: > Hello > I'm trying to create a item delegate for a sql table (postgres db) > where i have a field (type bytea) that should contain a PNG image. > This is the code of the create editor method: > > def createEditor(self, parent

Re: [PyQt] QPixmap.loadFromData()

2013-01-28 Thread paolo
I changed my code in this way, converting bytea field to a text field: def createEditor(self, parent, option, index): dd = DisplayDialog(parent) ba = index.model().data(index, Qt.DisplayRole) if ba: pix=QPixmap() print("Load", pix.loadFromData(QByte

[PyQt] QPixmap.loadFromData()

2013-01-24 Thread paolo
Hello I'm trying to create a item delegate for a sql table (postgres db) where i have a field (type bytea) that should contain a PNG image. This is the code of the create editor method: def createEditor(self, parent, option, index): dd = DisplayDialog(parent) ba = index.model().