For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

GTK GUI for Cas.Cade Application

Sharjith Naramparambath's picture

Has anyone used GTK or glade for making GUI for cascade applications? If yes can I get some help about it?
I have built the basic window and controls using GTK but don't know how to integrate a cascade viewer and functionality to it.
Plesae help.

N. Sharjith

Patrik Müller's picture


not my GUI, but you could try the following link:

Perhaps it helps.

Best regards,

Patrik Müller

PG's picture


I think this link is not available now.
Pl. send the correct link

Patrik Mueller's picture


the link is about 4 years old. I think sourceforge has removed the project :-(



QbProg's picture

Anyway, OpenCascade is designed so that can run almost on any drawable "thing", i.e. any window where OpenGL can open a context. For example, in Windows you can use OpenCascade on any HWND you pass to the viewer/window/driver set.
So I suppose the same thing it's true for X. I don't know X programming, but you should find the "Handle" of the GTK window and create a Viewer/View on it. Then you pass all the required events to the view and the game is over :)

Good Luck.

Mark's picture

roberto's picture

I need use OpenCascade 6.1 for Qt3.

Sharjith Naramparambath's picture

Dear all,
i have cooked up a sample code based on gtk gui finally with some reference of gtkmm code from this forum itself. i have done it using glade as the interface builder. the appication is complete like the data exchange sample provided with occ using qt. but it is single document only. i would like to share the code to the forum but donot have a webspace to host . if anyone is interested, i can mail him the tar file of the project.

P Dolbey's picture

How big is the file?

You can send it "peter at dolbey dot freeserve dot co dot uk" (with the obvious character replacments) and I could see if it would fit on my site, along with my Qt4 demo. It would be interesting to see how these two demos might be aligned.


PG's picture

Is the code available to the forum users ?
What are the tools/libraries used ?
- gpr

P Dolbey's picture

Is the code available to the forum users? Of course. Visit

Its designed to run with Qt 4.2.1 and OCC 6.1 compiled with VS2005. The main design intention of the current demo is to prove that OCC and Qt can be linked without using any Qt3 support objects. However beware of a couple of gotcha's.

1. The QtOpenCascadeWin.pri file contains references to a bunch of libraries you may not have if you haven't recompiled OpenCASCADE from source. These are the wok*.libs and the libs for DRAWEXE. You can remove these from the pri file.

2. I have built OCC 6.1 and Qt 4 on Visual Studio 2005 at home. There may be problems with memory allocation if you mix VS2005 and VS2003 binaries. I have tested that the modification above works fine using VS2003, Qt4 and the standard dlls (build with VS2003 on Windows).

The sample is still a work in progress - I only had time to re-edit the web pages slightly over the week-end. There's some discussion on

I've added some minor grid management functionality since the original upload ,an experimental "point on plane" algorithm, and I'm adding some file readers into the code. But for the last couple of weeks I've been looking at some the "old" OpenCASCADE projects to try to determine the right direction for the next version. If anyone has knowledge of any activity with FreeCAD, exoTK and so on, please let me know via this forum. And I'm considering taking "requirements" from others as well.


P Dolbey's picture

p.s. Unfortunately if its the GTK demo your after, Nair never contacted me.

PG's picture

Thanks .. i was looking for the GTK version. ( as QT is not free
for deployment)
Have u built using Qt and OCC on Linux ?

P Dolbey's picture

No, but theoretically nothing in the example source code is hardwired to Win32. I did leave the WNT compile time directive in the .pro file without a "win32:" prefix, and it should be possible to create a QtOpenCascadeUnix.pri file to enable qmake to create makefiles that link to Unix libs and reference this in the .pro file.


P Dolbey's picture

Good news for those interested. Nair has posted his GTK sample to me and it should be available for download by the end of the week (hopefully tonight). I'll update the forum when its available.


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.