From 213b61427aeafbda96da666b52be21fe85bfdc42 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Tue, 23 Apr 2024 19:35:54 +0100 Subject: [PATCH] Draft: Fix QImage object has no attribute 'byteCount' 'PySide6.QtGui.QImage' object has no attribute 'byteCount' load_texture: unable to load texture --- src/Mod/Draft/draftutils/gui_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Draft/draftutils/gui_utils.py b/src/Mod/Draft/draftutils/gui_utils.py index ed3d63b046..4cce4f24bf 100644 --- a/src/Mod/Draft/draftutils/gui_utils.py +++ b/src/Mod/Draft/draftutils/gui_utils.py @@ -734,7 +734,7 @@ def load_texture(filename, size=None, gui=App.GuiUp): # else: # p = QtGui.QImage(filename) size = coin.SbVec2s(p.width(), p.height()) - buffersize = p.byteCount() + buffersize = p.sizeInBytes() width = size[0] height = size[1] numcomponents = int(buffersize / (width * height))