Using a Qt-based DLL in a non-Qt application

后端 未结 2 1670
轻奢々
轻奢々 2020-11-30 04:50

Am I doing it right?

A client of mine has a group where I\'m developing Qt-based client-server stuff with a lot of fun widget stuff and sockets.

Another grou

2条回答
  •  我在风中等你
    2020-11-30 05:27

    The Qt Documentation for 4.5.2 says that the arguments to QCoreApplication need to have lifetimes as long as the application object - so you shouldn't really use local variables.

    Apart from that little thing:

    I'm grappling with the same problem, and everything seems to work for me too. I would recommend being very careful at unload / exit time, however, since if you're using the event loop from another application and that event loop is stopped before your library is unloaded then all sorts of crashy nastiness can happen when you try to close() sockets and delete QObjects.

提交回复
热议问题