Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force my application to open one exe only? qt, linux

I want my application to open only one process, i.e. if the one process is already opened and the user want to open the exe again - it won't open another process.

how can I do it in Qt - linux?

10x!

like image 801
devdev Avatar asked Nov 03 '10 12:11

devdev


1 Answers

What you're looking for is QtSingleApplication.

If you start another instance of your application, the first one will even get notified about it (you can pass whatever data structure you want).

I used it to bring the existing application to the front whenever another instance is started.

like image 90
ereOn Avatar answered Oct 01 '22 13:10

ereOn