Answer the question
In order to leave comments, you need to log in
How to pass image to QPixmap over Socket?
I am writing server and client code, where I form a Hash Table (dictionary) with arrays and transfer it over the socket, but there was a problem - this is writing a variable of the QPixmap type to the array, because on the server side I do not create the QGuiApplication class, so I cannot transfer the image in QPIxmap. How can an image be converted so that it can be written to an array on the server side and converted to a QPixmap on the client side.
{
'ObjName':["", ""],
'name':["", ""],
'des':["", ""],
'image':[QtGui.QPixmap("Путь"), QtGui.QPixmap("Путь")],
'version':,
'bought':[True, False],
'download':
}
self.request.sendall(pickle.dumps(<Тут хеш таблица>))
self.ImageGame.setPixmap(image)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question