0

I have Qt GUI application which I want that the user will open one only. I want that if the user will click first time on th exe - it will open the application and when he will click it again it will open the first one.

i don't want to do it with QtSingleApplication. I want to know exacly how to open the GUI on the second time.

Help me please!

gln
  • 1,011
  • 5
  • 31
  • 61

1 Answers1

4

Even if you don't want to, QtSingleApplication is what works. If you want to learn how it is implemented, you can always read the source code.

laalto
  • 150,114
  • 66
  • 286
  • 303
  • @gln: Maybe your question could then be rephrased as how to make it work. For example, what you've attempted and how it fails. – laalto Nov 08 '10 at 08:22
  • I fails to include the headers. I put the QtSingleApplication and QtLocalPeer h and cpp in my project but it does :undefined reference to QLocalServer... – gln Nov 08 '10 at 10:16
  • @gln: See the Install.txt file in the QtSingleApplication archive for detailed instructions. In this case, you need to add `QT += network` to your project file. – laalto Nov 08 '10 at 11:05