[vtkusers] Problem QVTKWidget using vtkCarbonRenderWindow instead of vtkCocoaRenderWindow
Michael Jackson
mike.jackson at bluequartz.net
Fri Sep 26 07:34:35 EDT 2008
Elvis,
What you want to look at is separating the carbon and cocoa code
into 2 files just like is done with vtkCarbon/CocoaRender Window. Then
in the QVTKPlugin CMakeLists.txt you can detect if VTK_USE_CARBON or
VTK_USE_COCOA is enabled and then add that source file to the QVTK
source file list. Since that mirrors the rest of VTK that seems like
the appropriate approach.
After you get things working then submit a bug report and then
submit your patches to the bug report.
Keep Going.
Mike Jackson
On Sep 26, 2008, at 4:13 AM, Elvis Dowson wrote:
> 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.
>>
More information about the vtkusers
mailing list