I'm pretty new on opencascade and I'm having troubles on setting a OCC view into a Qt window.
I Tried the code suggested according to release notes of version OCC6.6.0, but There is a problem with WinId() function.
The problem is that I get an error compiling this.
I'm using Opencascade 6.6.0 , Qt5 and MS Visual Studio 2012.
error C2664: 'WNT_Window::WNT_Window(const Aspect_Handle,const Quantity_NameOfColor)' : cannot convert parameter 1 from 'WId' to 'const Aspect_Handle'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1> Generating Code...
See below the code I'm using:
Handle(Graphic3d_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver ("TKOpenGl");
aGraphicDriver->Begin (new Aspect_DisplayConnection());
TCollection_ExtendedString aNameOfViewer ("Visu3D");
Handle(V3d_Viewer) aViewer = new V3d_Viewer (aGraphicDriver, aNameOfViewer.ToExtString());
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
Handle(WNT_Window) aWindow = new WNT_Window (winId());
Handle(V3d_View) aView = aViewer->CreateView();