PDA

View Full Version : Single instance



franco.amato
31st January 2011, 18:38
Hi to all,
is there any ways to have a single instance of the same application?
Regards

squidge
31st January 2011, 18:44
Yes, QtSingleApplication :

http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html

franco.amato
31st January 2011, 18:46
Yes, QtSingleApplication :

http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html

Hi I included QtSingleApplication header and the compiler gives error

Lykurg
31st January 2011, 19:04
the compiler gives error
No way!!!!!

franco.amato
31st January 2011, 19:14
No way!!!!!
Why shouldn't be possible? So I'm crazy.
Here a screenshot 5841.
Regards

Lykurg
31st January 2011, 19:26
Even after you post the screen shot:

No way!


Translation: show us the error, crystal balls are after all not anymore as good as they used to be in the 1920th.

wysota
31st January 2011, 19:26
Let me explain what Lykurg meant - in his short ironic post he noticed that your post that the compiler gives you an error doesn't bring you (or anybody else) even a step closer to solving the problem because you are not providing any relevant information. A possible response to "the compiler gives error" might be "then fix it". Then you would probably say "How?" and Lykurg would say "I don't know" or something similar. By the way, your screenshot also qualifies for a "no way!" response. If you want help, don't expect us to guess what your problem looks like.

Edit: Yeah, well... I was right about the "no way" thing about a screenshot ;)

franco.amato
31st January 2011, 19:28
Even after you post the screen shot:

No way!


Translation: show us the error, crystal balls are after all not anymore as good as they used to be in the 1920th.

The error is:
'QtSingleApplication': No such file or directory at the line: #include <QtSingleApplication>

wysota
31st January 2011, 19:31
Ok, franco, let's play a teacher-student stunt. My question is - what to do to make an include file visible for the compiler in a Qt project?

franco.amato
31st January 2011, 19:34
Ok, franco, let's play a teacher-student stunt. My question is - what to do to make an include file visible for the compiler in a Qt project?

Include the folder, I searched such file in my Qt installation and I can not find it

wysota
31st January 2011, 19:50
What do you mean by "include the folder"? What folder? And include it where?

franco.amato
31st January 2011, 19:51
What do you mean by "include the folder"? What folder? And include it where?

include the folder to the 'additional include path' of my visual studio.
The folder where such include should be stored

wysota
31st January 2011, 19:54
So how do you add a folder to a list of directories where your compiler looks for includes?

franco.amato
31st January 2011, 19:56
So how do you add a folder to a list of directories where your compiler looks for includes?

In the project settings, I don't know why you think to me as a student when I'm not. Is not the first additional path that I added to the
project. Simply I can not find such include, maybe it's part of the commercial version of Qt that I don't have.

wysota
31st January 2011, 19:59
Who said it was part of Qt?

franco.amato
31st January 2011, 20:10
Who said it was part of Qt?

The link sent to me http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html
by Lykurg. I think that's is part of Qt

wysota
31st January 2011, 20:16
Then you think wrong. Look at the URL. And then open the URL and click the "Home" link.

franco.amato
31st January 2011, 20:45
Then you think wrong. Look at the URL. And then open the URL and click the "Home" link.

So where can I download it?

Zlatomir
31st January 2011, 20:50
From gitorious (http://qt.gitorious.org/qt-solutions)

wysota
31st January 2011, 20:59
So where can I download it?

Look at the URL. Work your way up the url. If you don't want to be treated as a student then stop asking a question every time you stumble upon an obstacle. A student is a person who still has a lot to learn. You're at exactly the same stage for the last 2 years or more.

squidge
31st January 2011, 21:15
The link sent to me http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html
by Lykurg. I think that's is part of QtIf you can't even read a thread correctly and get my name right, I'm not surprised your struggling to use something that is clearly not a part of Qt. You have been told where it can be downloaded, and the package itself comes with instructions on how to install it and use it with your application.

You can't expect us to do everything for you. Some things you have to do for yourself.

Lykurg
31st January 2011, 22:28
The link sent to me http://doc.qt.nokia.com/solutions/4/qtsingleapplication/qtsingleapplication.html
by Lykurg. I think that's is part of Qt


If you can't even read a thread correctly and get my name right,Thanks for the clarification. I don't like to receive credit for something I haven't done. Even if it was a good answer.

@wysota: Our "double" post saved my day! It is long time ago I had died laughing. :D

wysota
31st January 2011, 22:51
@wysota: Our "double" post saved my day! It is long time ago I had died laughing. :D
Nice I could be of service :-)

franco.amato
31st January 2011, 23:03
I don't agree with you but I respect your idea

Lykurg
31st January 2011, 23:17
Sorry, but you don't agree with whom about what? Didn't get it.

So did you managed to download the source files and include them? (Yes, we are still willing to help you.)

xtal256
31st January 2011, 23:41
Ok, the OP may ask some dumb questions, but where to download it is not one of them. The link posted was just the documentation, and i see no download link whatsoever. Zlatomir posted a download link later, and the OP could have easily googled to find an answer (http://developer.qt.nokia.com/forums/viewthread/3387), but it is not "obvious".

fyi, I too am interested in using a single application instance, so thank you for the link.

franco.amato
31st January 2011, 23:46
Only to specify.
There are no dumb questions on my posts.

squidge
1st February 2011, 00:09
Ok, lets wrap this up. Yes, only the page to the documentation was provided, but you could tell it was part of Qt Solutions. It even says "Solutions" are part of the URL! So lets go to the home and click on "Solutions". We see a page that clearly states "The Solutions - available at http://qt.gitorious.org/qt-solutions". Click the link and download. No need to google, but that is of course an option.

Maybe that wasn't obvious to some people, but it seems clear (to me at least) that its not part of the standard Qt distribution.

xtal256
1st February 2011, 06:47
@squidge: No where on that documentation page, or any page it links to, did i see a link to gitorious. Also, i do not (without googling) know what "Qt Solutions" is or that it is not part of the Qt framework. That part you could have at least explained to the OP.

@Franco: When asking questions on a forum, you need to be "web smart" (like street smart but for the web :)).
Firstly, before even posting, you should google your problem to see if anyone else has already found a solution, or asked about it. If google turns up nothing, or it is not quite what you want, then you can post.
Second, ask smart questions (http://www.catb.org/~esr/faqs/smart-questions.html). If you get a compiler error, specify the exact error and what you were doing to get the error. And when someone asks you a follow-up question, try to give as much information as you think is necessary (more information never hurt anybody).

arnaiz
1st February 2011, 15:36
I agree with xtal256. There is no need to be so acid with people from our community. We all should be more polite with each other. Not all of us are "Advanced users" or "experts". Of course, Franco wasn't clear enough, but it was not necessary to be so humiliating.

franco.amato
1st February 2011, 16:44
I agree with xtal256. There is no need to be so acid with people from our community. We all should be more polite with each other. Not all of us are "Advanced users" or "experts". Of course, Franco wasn't clear enough, but it was not necessary to be so humiliating.

eheh thanx arnaiz. I'm used to this behavior from squidge, Lykurg and wysota ( they think to be superman and the rest of the world is ignorant )

Lykurg
1st February 2011, 17:01
Well, in the beginning we were very friendly as everybody is invited to read through the early posts. But after telling you time after time to ask more precise questions and we had to pull every single information out of you, and you don't care about, I guess it is justified to answer ironic. This not more disrespectful as your asking style. And after all, we are helping.


( they think to be superman and the rest of the world is ignorant )

Congratulation! With that statement you win a "100-days-without-help-from-me" voucher. And just to be correct: we are superman.*






---
* please remember the previous statement about irony.

franco.amato
1st February 2011, 17:05
Well, in the beginning we were very friendly as everybody is invited to read through the early posts. But after telling you time after time to ask more precise questions and we had to pull every single information out of you, and you don't care about, I guess it is justified to answer ironic. This not more disrespectful as your asking style. And after all, we are helping.


No problems. Please did you read your answer? Because you didn't help me because until now I could not download the single instance application so? And seems I'm not the only one.

Zlatomir
1st February 2011, 17:33
Franco, the download link is on this thread, since yesterday ;) also xtal256 posted another link which gives the link for Qt Solutions code, and some recommendation on how the forums usually helps you.

You missed both because you where to busy accusing Squidge, Lykurg and Wysota... yes they where a little bit ironic, but take an advice from that, it is obviously that you didn't even bothered to try to find that source, not to mention that you ignored our*** posts and only searched for "evidence" that Squidge, Lykurg and Wysota have "something against" you.
***Squidge, Lykurg and Wysota are included in that our

Lykurg
1st February 2011, 17:33
In #18 you first asked where to download it. The very next post of Zlatomir has the download link. A git repository. All informations are given explicitly. And until you haven't said a word, that you can't handle git repositories. How should we know that? Say it! That is what we try to tell you all the time. You must say what your problems are. Not only that it does not work etc.

And - the voucher is taking effect right afterwards - what is difficult of: clicking the "source tree" link, and then "Download master as tar.gz"? True, maybe we are too much experts that we assume that that is possible for everyone who post at this forum and is used to program in C++.

wysota
1st February 2011, 21:09
I'd like to wrap up this discussion. There is a very nice document that is even referenced in this thread, it is referenced when opening a new thread, it is referenced in many of our users' signatures and posts. I'm sure Franco was given a link to the document a number of times yet I'm pretty much certain he hasn't read it. The document explains both why we answer some questions the way we do and how to ask questions in a way to get a more helpful answer. The document was assembled by Eric S. Raymond (if you don't know who he is, I suggest to read about him) and is called "How to ask questions the smart way (http://www.catb.org/~esr/faqs/smart-questions.html)". I really recommend everyone reads it from beginning to end, especially if he is looking for help on an online site (whatever the nature of the site). My personal opinion is we are sometimes being too patient when answering questions which causes people to push the limits. Don't be surprised if we bite back. It's still better than ignoring you completely. If you prefer to be ignored then just stop posting.

SixDegrees
1st February 2011, 22:09
I agree with xtal256. There is no need to be so acid with people from our community. We all should be more polite with each other. Not all of us are "Advanced users" or "experts". Of course, Franco wasn't clear enough, but it was not necessary to be so humiliating.

Check the last couple years' worth of this posters questions. There's every need to be acidic in this particular case.

xtal256
2nd February 2011, 00:05
I agree with xtal256. There is no need to be so acid with people from our community. We all should be more polite with each other. Not all of us are "Advanced users" or "experts". Of course, Franco wasn't clear enough, but it was not necessary to be so humiliating.
Check the last couple years' worth of this posters questions. There's every need to be acidic in this particular case.
I wasn't saying that there is no need to be acidid, i was merely pointing out that the Qt Solutions link had no download link whatsoever, yet Wysota et. al. seemed to be saying that it is easy to find said download link and that you're an idiot if you don't know what "Qt Solutions" are.
Of course, that does not excuse Franco from completely ignoring the git link that was posted later, and saying that we have not helped him.

wysota
2nd February 2011, 00:27
I wasn't saying that there is no need to be acidid, i was merely pointing out that the Qt Solutions link had no download link whatsoever, yet Wysota et. al. seemed to be saying that it is easy to find said download link and that you're an idiot if you don't know what "Qt Solutions" are.
If you work your way up the URL that was given, eventually you end up at doc.qt.nokia.com where above the expression "Solutions for Qt" there is this big header "Addons" and "Components and Addons for Qt" which clearly marks this is not part of Qt. Of course it requires elementary curiosity and technical skills to reach this page and this conclusion but can you expect less from a person who has been profesionally developing with Qt for over three years?

And one more thing, I never said the URL had a download link anywhere so please don't include my name in a sentence stating so.

And to use one of the nice things available: http://lmgtfy.com?q=QtSingleApplication+download

Oh... and a "Did you know" tip for today:
Did you know that classes that are part of Qt have the prefix Q and classes that are not part of Qt but are developed by Qt developers have the prefix Qt?