I can make native win32 calls (GetPixel/SetPixel) on a QWidget by using QWidget::getDC .. How do I do this for Mac builds?
Using QImage/QPixmap for retrieving pixel information is not an option because I need very fast access to what's already been drawn onto a QWidget via QPainter on both Windows and Mac.
The reason I am using GetPixel on windows is to implement 2d mouse picking.
I am not sure what you are trying to do but if you want the underlying window system handle/ID, you can use QWidget::winId()
which returns HIViewRef
or NSView
on Mac depending on if it's Carbon or Cocoa version of Qt library.