[vtkusers] Problem QVTKWidget using vtkCarbonRenderWindow instead of vtkCocoaRenderWindow
Elvis Dowson
elvis.dowson at mac.com
Tue Sep 23 10:20:34 EDT 2008
Here is a more up-to-date link: http://trolltech.com/developer/downloads/qt/rsync/?searchterm=Qt%204.5
On Sep 23, 2008, at 6:19 PM, Elvis Dowson wrote:
> Hi Mike,
> There is an alpha release of Qt-4.5 on the troll
> tech website. Here is the link: http://trolltech.com/company/newsroom/announcements/press.2008-06-09.7117549806/?searchterm=Qt%204.5
>
> Could you guide me on what I should do to modify vtk to support
> Qt-4.5 using Cocoa? I'm basically trying to get the QVTK plugin to
> compile correctly and use the Cocoa framework.
>
> Best regards,
>
> Elvis Dowson
>
>
> On Sep 23, 2008, at 5:36 PM, Mike Jackson wrote:
>
>> Qt 4.5 will be based on Cocoa (That is the current news from TT).
>> Qt 4.4 is CARBON based so you will have to build VTK using
>> Carbon=ON if you want to use Qt. As far as supporting Cocoa/Qt in
>> the future I am not sure if anyone has really looked at it yet.
>> _IF_ TrollTech does deliver Qt/Cocoa for Qt 4.5 then the test is
>> pretty simple. If the Qt Version is less than 4.5 then use Carbon.
>> If it is 4.5 or above use Cocoa. This can be detected in CMake and
>> set accordingly.
>>
>> Q_WS_MAC is defined by Qt in its header files.
>>
>>
>> _________________________________________________
>> | Mike Jackson - Principal Software Engineer |
>> | BlueQuartz Software |
>> | mike.jackson at bluequartz.net |
>> | www.bluequartz.net |
>> ---------------------------------------------------
>>
>> On Sep 23, 2008, at 9:27 AM, Elvis Dowson wrote:
>>
>>> Hi,
>>> I just downloaded the latest vtk-5.x sources from cvs
>>> (vtk-5.3) and tried to compile shared libraries, with
>>>
>>> Problem Outline
>>>
>>> VTK_USE_CARBON=OFF
>>> VTK_USE_COCOA=ON
>>> VTK_GUI_SUPPORT=ON
>>> VTK_USE_QVTK=ON
>>> DESIRED_QT_VERSION=4
>>>
>>> I am using qt-4.4.2 for mac os, which has support for Cocoa.
>>>
>>> Somehow, even through I have disabled support for Carbon, this
>>> error comes up.
>>>
>>> "vtkCarbonRenderWindow::UpdateGLRegion()", referenced from:
>>> QVTKWidget::DirtyRegionProcessor(OpaqueEventHandlerCallRef*,
>>> OpaqueEventRef*, void*) in libQVTK.a(QVTKWidget.o)
>>>
>>> If I look at the file GUISupport/Qt/CMakeLists.cxx (what is this
>>> file used for BTW?)
>>>
>>> I see the following implementation. Shouldn't it use
>>> vtkCocoaRenderWindow instead?
>>>
>>> #if defined (Q_WS_MAC) && QT_VERSION >= 0x040000
>>> OSStatus QVTKWidget::DirtyRegionProcessor(EventHandlerCallRef,
>>> EventRef event, void* wid)
>>> {
>>> QVTKWidget* widget = reinterpret_cast<QVTKWidget*>(wid);
>>> UInt32 event_kind = GetEventKind(event);
>>> UInt32 event_class = GetEventClass(event);
>>> if(event_class == 'cute' && event_kind == 20)
>>> {
>>> static_cast<vtkCarbonRenderWindow*>(widget->GetRenderWindow())-
>>> >UpdateGLRegion();
>>> }
>>> return eventNotHandledErr;
>>> }
>>>
>>> #endif
>>>
>>>
>>> If I look at the file QVTKWidget.h
>>>
>>> there is no implementation for the case when qt version >= 4 and
>>> the user selects the Cocoa libraries.
>>>
>>> #if defined(Q_WS_MAC) && QT_VERSION >= 0x040000
>>> #include <Carbon/Carbon.h> // Event handling for dirty region
>>> #endif
>>>
>>> How can I go about trying to fix this?
>>>
>>> Where is Q_WS_MAC defined?
>>>
>>> General Question
>>>
>>> What should I do to make the modifications to support Cocoa for
>>> QVTK?
>>>
>>>
>>> Best regards,
>>>
>>> Elvis Dowson
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
More information about the vtkusers
mailing list