PDA

View Full Version : To incorporate a window in Qt



augusbas
24th January 2011, 12:03
Hi all,

I need to add a third party window created by some classes ( listed below) to my Qt Widget or Qgraphicsview ...How do i achieve this


My third party classes can able to create a window like this.


Ascan = new spxascan;
Ascan -> create ( window ,0, x,y , wid, height) ;


The create function definition for linux is like this :

Create(Display *display, Drawable destination, int xpos, int ypos, int width , int height)


Regards,
Augus

Sven
24th January 2011, 12:25
We do something similar with Delphi windows.

I don't know how it works on unix system but i can give u a hint for windows:

-> Grab the originally windows handle of your window
-> Create a QWinWidget (http://doc.trolltech.com/solutions/qtwinmigrate/qwinwidget.html) instance and pass that handle to it.
The QWinWidget class does the rest.

And then you can use this widget in layouts.

I think there should be something similar on unix systems.