PDA

View Full Version : again Open Cascade + Qt 4.2.2 but detailed...



Shuchi Agrawal
18th January 2007, 05:45
Hi,
i know i m putting the same question again but i m sure that this time i m asking relevant information of Qt.
i hope this time i m not wasting anyone's time by asking the similar ques again.
i m making an MDI application.now if i m inheriting the child window fm QGraphicsView because i want 2D and 3D features(zooming,rotating an all..) for the child window. But here comes Open Cascade in the picture when i want to use Open cascade APIs to draw on the child windows.
now my ques is how can i use the APIs of Open Cascade to draw images on the appln (or child window) made in Qt.
i m using evaluation version of Qt 4.2.2 and Windows XP and Open Cascade 5.2 and Visual Studio C++ 6.0?
i hope this time the ques is relevant to Qt too..

thanks in advance for giving time to my Ques in advance :)

wysota
18th January 2007, 10:07
You may use whatever API you want, but be prepared to loose some of Qt functionality then. You'll also have to do some acrobations with window attributes to be able to use other drawing APIs. See docs on widget attributes for details.

jacek
18th January 2007, 11:38
http://www.opencascade.org/org/forum/thread_10815/
http://www.opencascade.org/org/forum/thread_10338/

Shuchi Agrawal
18th January 2007, 12:00
so do u mean that by doing so i wil loose the property of cross platform in Qt? or is there any other loss of functionality which u mean?
plz specify... and i could not find any sepearte doc on widget attributes.. plz help..

Shuchi Agrawal
18th January 2007, 12:17
http://www.opencascade.org/org/forum/thread_10815/
http://www.opencascade.org/org/forum/thread_10338/

thanks jacek, but i have already visited these links earlier... the code given in this is helping but i m not able to execute those code so as to get an executable..

jacek
18th January 2007, 12:29
the code given in this is helping but i m not able to execute those code so as to get an executable..
What problems do you have the code mentioned in those threads?

Have you tried this: http://myweb.tiscali.co.uk/dolbey/QtOpenCascade/ ?

wysota
18th January 2007, 12:37
so do u mean that by doing so i wil loose the property of cross platform in Qt? or is there any other loss of functionality which u mean?
It depends on the widgets used. If you want to paint on a QGraphicsView, you might loose some of its functionality, you'll surely loose functionality related to any rendering optimisations done by Qt, etc.


and i could not find any sepearte doc on widget attributes.. plz help..

http://doc.trolltech.com/latest/qt.html#WidgetAttribute-enum

Shuchi Agrawal
23rd January 2007, 05:56
hi all,
i m sending a very simplified sample code of drawing a box using Qt n open cascade..
can any1 help with some better things in the code as its not working properly...
near the menu item, its not filling the window..?

851
in view.cpp : winId is giving runtime error

pdolbey
30th January 2007, 16:36
Now I'm sure I've seen some of that code before but I can't remember where...

Anyway did you fix your problem. I can't quite understand where you got to. If you say that the centralWidget is not filling the screen this looks like a problem relating to missing resize event handler - the latest code on my web site just uses this event to mark a "must be resized" flag for the next paint event as it saves a full repaint cycle during resize. (The latest code has now also been ported to Linux - Ubuntu Edgy). Or is the problem still in the winId code.

Remember also that the QtOpenCascade demo was designed and tested with Open Cascade 6.1 if you've got working on 5.2 at all I'm impressed.:)

If you've still got a problem post back here on the Open Cascade forum - I actually keep an eye on both but I've never been "famous" before.

Pete

Shuchi Agrawal
31st January 2007, 07:45
thanks a lot PETE,
i posted tht code in Qt forum too and someone replied that its working on his system so now i think there is some installation problem or any other issue..
even i m not exactly able to figure out that where exactly the problem lies.

pdolbey
31st January 2007, 18:15
At the top of the thread, you said you were using OCC 5.2 and VC++ 6.0, but now in your signature I see you're using OCC 6.1. Are you using the standard installed DLLs? If so, consider that it was compiled with VC++ 7.1 and uses the corresponding runtime libs.
Have you tried recompiling all the OCC sources from scratch with VC++ 6.0, the dsw workspaces are in the ros/adm/win32 folder and the instructions for building them are in the documentation. Well worth a try, but it'll take some hours to complete (build the debug libs as well, but ignore DRAW unless you've got a tcl/tk distro - and you won't need WOK much either).

Pete

Shuchi Agrawal
1st February 2007, 07:03
ya actually i was using OCC 5.2 earlier but as it didnt worked so i changed to OCC 6.1 and i m really sorry to update this change in my signature, which i did after you mentioned..
i will try all what u said and let u know.. thanks a lot..