[Qt-interest] How to use QtSingleApplication.dll?

Andre Somers andre at familiesomers.nl
Fri Dec 18 10:54:41 CET 2009


程梁 wrote:
> Hi! I read this code but if I use QtSingleApplication from dll, I do 
> not need to load this dll first using QLibrary?
No. Just like you don't need to load QtCore.dll first using QLibrary... 
Just link against it.

André

>
> 2009/12/18 Bo Sun <b.sun at tlk-thermo.com <mailto:b.sun at tlk-thermo.com>>
>
>     This is an example:
>
>     main(int argc, char *argv[]){
>
>     QtSingleApplication app("AppName", argc, argv);
>
>     app.initialize(true);
>
>>
>     return app.exec()
>
>     }
>
>      
>
>      
>
>     *Von:* qt-interest-bounces at trolltech.com
>     <mailto:qt-interest-bounces at trolltech.com>
>     [mailto:qt-interest-bounces at trolltech.com
>     <mailto:qt-interest-bounces at trolltech.com>] *Im Auftrag von *程梁
>     *Gesendet:* Freitag, 18. Dezember 2009 07:10
>     *An:* qt-interest at trolltech.com <mailto:qt-interest at trolltech.com>
>     *Betreff:* [Qt-interest] How to use QtSingleApplication.dll?
>
>      
>
>     Hi, there! I want to use QtSingleApplication.dll on Windows. I use
>     QLibrary to load this dll successully,
>
>     when program runs, Qt tell me that I should instantiate the
>     QApplication object first.
>
>     Then how can I use QtSingleApplication instead QApplication from
>     the dll file before the QApplication create?
>
>     Must I add the sources of QtSingleApplication into my project in
>     order to use it?
>
>      
>
>     Thank you!
>
>     -- 
>     Cheng Liang
>     from: chengliang.soft at gmail.com <mailto:chengliang.soft at gmail.com>
>
>
>
>
> -- 
> Cheng Liang
> from: chengliang.soft at gmail.com <mailto:chengliang.soft at gmail.com>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   




More information about the Qt-interest-old mailing list