Results 1 to 1 of 1

Thread: Qt MFC Migration Toolkit

  1. #1

    Default Qt MFC Migration Toolkit

    I am working with the QtMFC Migration toolkit and I have a question about how to incorporate it into an existing MFC application.

    The application I am working with is split into 3 projects: The GUI QT project which generates a .lib file. The GUI DLL project which links with the GUI QT lib and generates a .dll and a .lib file. Last there is the MFC Application project which links with the GUI DLL project and generates an executable.

    MFC Application
    (links with gui.lib and QtGui.lib)
    |
    V
    GUI DLL
    (generates gui.lib and
    links with guiQt.lib and QtGui.lib)
    |
    V
    GUI QT LIB
    (generates guiQt.lib)

    I am going to override the CWinApp::Run method in the MFC Application project to use QMfcApp::run which will create a QApplication object and process both MFC and Qt messages. Now that a QApplication object has been created in the MFC Application project, will the method QApplication::instance( ), if called within the GUI DLL project, return a valid pointer to that same QApplication object?

    If not, is it safe for the MFC application project to call an exported method of the GUI DLL project and pass a valid QApplication pointer as a parameter? Am I going about this the wrong way? Is this a place to use the QMfcApp:luginInstance method instead?
    Last edited by average; 4th April 2007 at 19:49.

Similar Threads

  1. Any Toolkit for designing VisualStudio-like GUIs?
    By burn2themax in forum Qt Programming
    Replies: 11
    Last Post: 29th July 2006, 10:00
  2. Motif to Qt migration
    By boss_bhat in forum General Discussion
    Replies: 1
    Last Post: 8th June 2006, 14:16

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.