We help IT Professionals succeed at work.

Run error in Qt

obad62
obad62 asked
on
I have started to write small programe in Qt
but when I pressed on run I recived this message :

No valid Qt version set. Set one in Tools/Options
Error while building project firstProgrameForTest
When executing build step 'QMake'
Canceled build.
Comment
Watch Question

Hi, Can you let me know which IDE are you using, I guess you are using Visual Studio right?
If you are using MS Visual Studio pleasae install Qt MS Visual Studio Plugin and then you will see "Qt" in MSVS Menu, you can use that to set what Qt version do you want to build your application.
OR Alternately you can install Qt Creator.
Let me know with more details if I did not guessed it right that you are using MSVS
 

Author

Commented:
Actually yes i used MS Visual Studio very well
Did you Install Qt's MS VS plug in?? If not pleasae do install that that will make your life very easy :)

Author

Commented:
And I have installed Qt creator but I have no idea about how can I deal with its staff so I will try to install your suggestion. I am realy warry about that is starting.

Before that many thanks for your response Mr.Omair
Okay so you have install Qt Creator Great and Congratulations for having one of the Koolest cross platform IDE on your machine.
But by default this will use MingW as compiler. There is way you can specify to use MS VS compiler but I will have to go to my machine to see how we do that. But no problem you can still run your application.
Go to Creator File->Open File  Project, and select the .pro file and open that. Thats it you are done to build your project. clieck Green color play sign
I hope you kow how to create .pro file. If Not here are the steps:
Open QT command prompt, ( start->allprograme->Qt ByNokia V4.6.2)->Qt 4.6.2 command Prompt.
Now to reache to the folder where you have your source file, If you have all your file under Folder "MyProject" then go to MyProject folder and run following:
C:\MyProject> qmake -project
this will create a poject file in your "MyProject Folder"
You can also build your prject from command prompt itself, Just run two more commad from here only:
C:\MyProject> qmake -project
C:\MyProject> qmake ( this will crate MAKE file in your folder)
C:\MyProject> nmake ( this will build your project)
You can find your executable under C:\MyProject> Debug>
You are all set.
The Other best way for MS VS user which I love is to have Qt MSVS plug in installed.
Let me know if you still have any problem.



Author

Commented:
good and I like to work on visual stedio but that requier profissional version and that is not ready in my computer so , I follow your links in other post as a totorial  but my problem her with Qt creator in this part that is : when I press on the play button I recived this message :

No valid Qt version set. Set one in Tools/Options
Error while building project firstProgrameForTest
When executing build step 'QMake'
Canceled build.  


I don't know how can I solve that

many thanks irfan
Okay, Did you tried building it from command prompt, just try that and let me know that will ensure if there is any problem in Qt installation in your machine.

Open QT command prompt, ( start->allprograme->Qt ByNokia V4.6.2)->Qt 4.6.2 command Prompt.
Now to reache to the folder where you have your source file, If you have all your file under Folder "MyProject" then go to MyProject folder and run following:
C:\MyProject> qmake -project
this will create a poject file in your "MyProject Folder"
You can also build your prject from command prompt itself, Just run two more commad from here only:
C:\MyProject> qmake -project
C:\MyProject> qmake ( this will crate MAKE file in your folder)
C:\MyProject> nmake ( this will build your project)
You can find your executable under C:\MyProject> Debug>

Author

Commented:
Hi irfan
I tried from yesterday run command prombet i recived this message : Windows searching for bin;.
And I cant to use make -project in win command prombe

So how can I do that please
Hey wait , it is not "make -project" it is qmake -project.
>>>Windows searching for bin;. This indicates your Qt\bin folder is not in the path, Did You open "Qt Command Prompt" ??? if you do then this should not give this message. can you please typ PATH and see your Qt\bin folder is there or not?
If you dont see then I must say your Qt installation is not proper. Let me know
Hey Thanx for choosing it as Good ans, but you didnt tell me how your problem solved,

Author

Commented:
I re- install another version which is Qt sdk by nokia v2010.03(open source )