Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MacOS X BigSur: QPainter::begin: Paint device returned engine == 0, type: 2

MacOS X BigSur: QPainter::begin: Paint device returned engine == 0, type: 2

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 682 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Santos
    wrote on last edited by Daniel Santos
    #1

    Hi
    I am getting this error while trying to draw a QPainterPath to a QPixMap. Below is the code

                QPainterPath 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: 3
    

    Metal : 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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • D Offline
        D Offline
        Daniel Santos
        wrote on last edited by
        #3

        Force it ? How do I do that ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          https://support.apple.com/en-us/HT202043

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved