QtSingleApplication
-
How you can see "here":http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html QtSingleApplication is a class of Qt framework but I can't include it in normal way because it isn't in my /usr/local/include directory, can I only download the source and compile it by myself? where can I get the source?
And I suppose this isn't a isolated case... there are some classes so.
Best Regards
Willy -
You can find the sources on http://qt.gitorious.org/qt-solutions.
QtSingleApplication was never a part of the Qt libs. It was only provided by Trolltech/Nokia as part of the Qt Solutions addons, so no includes in /usr/local/include. You can now download the sources from gitorious, as stated on the "Qt Solutions":http://qt.nokia.com/products/qt-addons/solutions-archive/ page.
-
Thanks again.
-
Is this the only way to prevent multiple instances of a QApplication? I am very dissapointed that there is no solution other than getting add-ons.
-
You can use shared memory (QSharedMemory) and system semaphore (QSystemSemaphore)
-
How is that implemented?
-
First you have to know what shared memory is, you can found same explanation here: http://en.wikipedia.org/wiki/Shared_memory
Here, there is an example how QSharedMemory works on Qt: http://qt-project.org/doc/qt-4.8/ipc-sharedmemory.html
-
I meant how is it implemented in the context of QApplication. I know what shared memory is! Qt seems to have its own way of doing things.
-
QApplication doesn't manage multiple instances, by QSharedMemory you can workaround it.