Home

Single Application

Description

The QtSingleApplication component provides support for applications that can be only started once per user.

For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance.

The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance.

On Windows the implementation uses FindWindow() to detect a running instance, and the WM_COPYDATA message to send string data.

On X11 systems the implementation uses X atoms to communicate through the selection mechanism.

On Mac OS X named ports are used both to detect a running instance and to send string data.

This Qt Solutions component is for Qt 3. For Qt 4 Solutions, please visit http://www.trolltech.com/products/solutions/catalog/4/.

Classes

Examples

Tested platforms


Copyright © 2003-2006 TrolltechTrademarks
Qt Solutions