PDA

View Full Version : QWidget inside MFC project



hINTModuleState
14th January 2008, 09:49
I am new to Qt, please help me with the following question :
Is it theoretically possible to embed an QWidget window inside an MFC project ?
at least if it is not possible to create QWidget as child of an MFC CWnd window, is it possible to create QWidget as child of Win32 window, using the Win32 API (createwindow,etc.) ?
Thak you in advance.

high_flyer
14th January 2008, 13:56
Yes it is possible (of course).
I've never done it, (a mixed MFC Qt project) but it should be enough linking against Qt and including the right headers as you would with any other library.
There are tools (http://trolltech.com/products/qt/addon/solutions/catalog/4/Windows/qtwinmigrate)that help with migration from MFC to Qt (and hence also mixing) but I don't know if they are only available for commercial customers (maybe some one else on the forum can comment on that point).
And here (http://doc.trolltech.com/solutions/4/qtwinmigrate/winmigrate-qt-in-win32-example.html)is an example of how you do it.

hINTModuleState
14th January 2008, 14:26
thank you Sir, thank very much for that last link you provided.I am reliefed.

randolf
9th October 2015, 15:22
Hi have a question about using a QWindow in a MFC Dialog, can someone post an example how its works?