Results 1 to 1 of 1

Thread: Calling GUI functions from a DLL

  1. #1
    Join Date
    Jul 2009

    Default Calling GUI functions from a DLL

    I am loading DLL plug-ins at runtime in my GUI application. Once loaded, I then call a method within the plug in called initialize(). In one of my plug-ins, this method makes a call to myMainWindowPtr->addDockWidget(). The myMainWindowPtr is a QMainWindow* that contains the address of the main application window. The problem is that whenever I call a method myMainWindowPtr->... the application crashes immediately.

    Please could anyone shed some light as to why calling QMainWindow methods from within the DLL, causes the application to crash?

    Edit: Nevermind. The problem was that the DLL was creating its own copy of static members and the value of myMainWindowPtr was never initialized.
    Last edited by inktomi; 19th July 2010 at 14:34. Reason: updated contents

Similar Threads

  1. class calling other class functions?
    By Hardstyle in forum Newbie
    Replies: 4
    Last Post: 2nd June 2010, 02:38
  2. Replies: 7
    Last Post: 15th January 2010, 20:45
  3. C++ Static Functions
    By weaver4 in forum Newbie
    Replies: 7
    Last Post: 17th November 2009, 10:42
  4. Regards CallBack Functions
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2009, 16:16
  5. name of exported dll functions
    By vrudolf in forum General Programming
    Replies: 2
    Last Post: 30th July 2006, 20:18


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.