class KUniqueApplication


Module kdeui
Namespace
Class KUniqueApplication
Inherits KApplication
KUniqueApplication is a KApplication which only uses a single process. When a KUniqueApplication is started, it attempts to contact an existing copy of the application. If successful, the program asks the existing process to create a new instance by calling its newInstance() method and then exits. If there is no existing process then the program forks and calls the newInstance() method. When newInstance() is called, the application will typically create a new window or activate an existing one.

Instances of KUniqueApplication can be made to behave like a normal application by passing the StartFlag.NonUniqueInstance flag to start().

Please note that this supports only one process per KDE session. If your application can only be opened once per user or once per host, you need to ensure this independently of KUniqueApplication.

The .desktop file for the application should state X-DBUS-StartupType=Unique, see ktoolinvocation.h

If your application is used to open files, it should also support the --tempfile option (see KCmdLineArgs.addTempFileOption()), to delete tempfiles after use. Add X-KDE-HasTempFileOption=true to the .desktop file to indicate this.

See also KApplication Author Preston Brown



enums

enum details

methods