[Solved] View Qt command prompt in Windows
-
wrote on 5 Jul 2013, 17:00 last edited by
Hi,
I'm using Qt 4.7 and when reading a book I found that there is a Qt command prompt.
In that book it is use to run the 'designer'.But I don't know how to open the Qt command prompt.
Can anybody help me?
Thanks in advance.
-
wrote on 5 Jul 2013, 17:45 last edited by
It is not clear to me what you are referring. However, "this is found by search on this webpage.":http://qt-project.org/search?search=prompt
You can use QProcess for some tasks you would typically perform from the command prompt. -
wrote on 5 Jul 2013, 18:06 last edited by
Thanks for the reply..
I'm currently reading "Foundations of Qt Development" by Johan Thelin. It says
"If you are running Windows, you can start Designer by selecting it from the Start menu or by starting the Qt command prompt and then typing designer at the console. "
my problem is how I open the Qt command prompt?
Thanks again...
-
wrote on 5 Jul 2013, 18:27 last edited by
The "Qt command prompt" is nothing but the standard Windows command prompt (aka "CMD.exe"), but with the PATH environment variable prepended by the Qt "bin" path. This means you can just enter any Qt program without a full path, because the command prompt will find it via PATH. That's all ;-)
To get such a command prompt, just select "Qt 4.8.5 Command Prompt" from the startmenu. Either that or open a command prompt via Start -> Run -> "CMD.exe" and then call "C:\your_qt_install_path\bin\qtvars.bat".
Equivalently you can type this inside the Windows command prompt:
@SET "PATH=C:\your_qt_install_path\bin;%PATH%"
SET "QTDIR=C:\your_qt_install_path"@ -
wrote on 6 Jul 2013, 02:59 last edited by
@ MuldeR,
Thank you very much for the support.
I found "Qt 4.8.1 Command prompt" in start menu. but couldn't find the qtvars.bat in installed location.
So I checked the properties of "Qt 4.8.1 Command prompt" and it appear as it runs qtenv2.bat. Then I run cmd.exe and set the path to qtenv2.bat.
Now I can open the designer using command prompt.Thanks again...
1/5