[vtkusers] Problem QVTKWidget using vtkCarbonRenderWindow instead of vtkCocoaRenderWindow
Clinton Stimpson
clinton at elemtech.com
Fri Sep 26 09:37:23 EDT 2008
That's the right flag, QT_MAC_USE_COCOA. It is initially set in
qconfig.h, which is generated by the configure script, and only forced
on in qglobal.h if building 64 bit.
I've attached a patch for you. How far does that get you?
Clint
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.
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qvtk.patch
Type: text/x-diff
Size: 4684 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080926/96656809/attachment.patch>
More information about the vtkusers
mailing list