[vtkusers] Problem QVTKWidget using vtkCarbonRenderWindow instead of vtkCocoaRenderWindow

Elvis Dowson elvis.dowson at mac.com
Fri Sep 26 04:13:50 EDT 2008


Hi,
         In the file qglobal.h, I found a definition called  
QT_MAC_USE_COCOA that could be used  to switch to a vtkCocoa  
implementation for QVTKWidget.

However, upon closer investigation, I find that it is only enable in  
Qt-4.5.x if 64-bit support is turned on.

#ifdef AUTODETECT_COCOA
#  ifdef Q_OS_MAC64
#    define QT_MAC_USE_COCOA 1
#  endif
#endif

I couldn't find any explicit definitions for Carbon, see code snippet  
from qglobal.h below

#elif defined(Q_OS_UNIX)
#  if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && ! 
defined(Q_WS_QWS)
#    define Q_WS_MAC
#    define Q_WS_MACX
#    if defined(Q_OS_MAC64)
#      define Q_WS_MAC64
#    elif defined(Q_OS_MAC32)
#      define Q_WS_MAC32
#    endif
#  elif !defined(Q_WS_QWS)
#    define Q_WS_X11
#  endif
#endif

So, I guess this implies that the quickest way to try to fix this  
issue is to add support for Cocoa bindings for QVTKWidget for 64-bits.

Best regards,

Elvis


On Sep 26, 2008, at 11:41 AM, Elvis Dowson wrote:
>
>
> Any ideas on which pre-processor symbol I can use to help switch  
> between Carbon and Cocoa. At the moment, there is only one symbol  
> Q_WS_MAC.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080926/879791b4/attachment.htm>


More information about the vtkusers mailing list