I think ChrisW67 answer is enough for what you are trying to do - users of the dll should use the factory method to create your custom widgets, by that time they already should have the QApplication instance up and running. If you need the QApplication instance yourself inside some custom class, just use QApplication::instance() method to retrieve it. The fact that your method is "placed" in separate dll is meaningless in that case, still it will be the same instance of QApplication, the one created by the user.