MacOS X BigSur: QPainter::begin: Paint device returned engine == 0, type: 2
-
Hi
I am getting this error while trying to draw a QPainterPath to a QPixMap. Below is the codeQPainterPath painterPath; ...<draw path>... QPixmap pixmap(size); pixmap.fill(); QPainter pixmappainter(&pixmap); pixmappainter.drawPath(painterPath); pixmappainter.end();I just brought this code from Windows, and it worked there. I am using qt 5.12.11 clang_64.
The project is built by the XCode command line developer tools from within the CLion IDE using CMake 3.20.2.Edit :
More info on this :2021-09-11 18:12:06.822766+0100 MapBrowser[2166:53633] MTLIOAccelDevice bad MetalPluginClassName property (null) 2021-09-11 18:12:06.880835+0100 MapBrowser[2166:53633] +[MTLIOAccelDevice registerDevices]: Zero Metal services found end of file2021-09-11 18:12:18.200929+0100 MapBrowser[2166:53633] QPainter::begin: Paint device returned engine == 0, type: 3Metal : I am on a 2016 macbook pro. I don't think I have Metal hardware on this machine. Why does QT require it ? Can I change it to what I have ?
Thanks,
Regards -
Hi,
If you have Big Sure running, then you have a Metal compatible machine otherwise you do not have the option to upgrade to it.
What could be happening is that for some reason you machine is not switching to the discrete GPU.
You can try to force the use it to see if things gets better.
-
Force it ? How do I do that ?
-