Results 1 to 4 of 4

Thread: QWidget inside MFC project

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QWidget inside MFC project

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWidget inside MFC project

    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 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 is an example of how you do it.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWidget inside MFC project

    thank you Sir, thank very much for that last link you provided.I am reliefed.

  4. #4

    Default Re: QWidget inside MFC project

    Hi have a question about using a QWindow in a MFC Dialog, can someone post an example how its works?

Similar Threads

  1. Dynamic widget not displayed upon Qwidget
    By ashukla in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2007, 12:11
  2. I need a project opinion.
    By hgedek in forum General Discussion
    Replies: 6
    Last Post: 25th September 2007, 19:54
  3. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 18:41
  4. Replies: 2
    Last Post: 11th July 2006, 15:19
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 23:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.