#include <stdlib.h>
-#if !defined WIN32
+#if !defined WIN32 && !defined __APPLE__
#include <QX11Info>
#include <GL/glx.h>
#include <X11/Xlib.h>
setBackgroundRole( QPalette::NoRole );//NoBackground );
// set focus policy to threat QContextMenuEvent from keyboard
setFocusPolicy( Qt::StrongFocus );
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) && OCC_VERSION_LARGE < 0x07000000
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0) && OCC_VERSION_LARGE < 0x07000000) || QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
setAttribute( Qt::WA_PaintOnScreen );
#endif
setAttribute( Qt::WA_NoSystemBackground );
*/
void OCCViewer_ViewPort::selectVisualId()
{
-#if !defined WIN32
+#if !defined WIN32 && !defined __APPLE__
XVisualInfo* pVisualInfo;
if ( QX11Info::display() )
{