Results 1 to 11 of 11

Thread: where is Qt and qmake installed

  1. #1
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default where is Qt and qmake installed

    I installed Qt on Mac from binary package. I don't know where it was installed (what folder) and where qmake is. How would I find out where it was installed? I'm new to Mac.

    Thanks

  2. #2
    Join Date
    Nov 2006
    Location
    indonesia
    Posts
    55
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    Hi,
    The simple method is you can search file qmake in your computer.

    Best regards,

    myta

  3. The following user says thank you to myta212 for this useful post:

    timmu (9th August 2012)

  4. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    Quote Originally Posted by timmu View Post
    I installed Qt on Mac from binary package. I don't know where it was installed (what folder) and where qmake is. How would I find out where it was installed? I'm new to Mac.

    Thanks
    If you used QtSDK then it should be in ~/QtSDK/Desktop/<qt.version>/<compilerversion>/bin.
    If you built it and ran sudo make install then it should be in /usr/local/Trolltech/<qt.version>/bin.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. The following user says thank you to spirit for this useful post:

    timmu (9th August 2012)

  6. #4
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: where is Qt and qmake installed

    Thank you very much for your answers.

    Is it true that if Qt is correctly installed on Mac then if you go to the terminal and type "qmake", then it should recognize the command. And typing "qmake -query" should show where it was installed (what folder). This is not happening in my case.

    Provided that Qt is installed in ~/QtSDK/Desktop/<qt.version>/<compilerversion>/bin as Spirit wrote above, how would I use qmake in that case? Do I need to navigate into the correct folder, put the source code in there and then use qmake through terminal to compile?

    Thanks!

  7. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    Well, if you use QtCreator from QtSDK then you don't need to do anything. QtCreator will find qmake by itself. But if you need to add additional Qt version then you should go to QtCreator's preferences (cmd + ,), navigate to "Build & Run", select "Qt Versions" tab. Here you can simply add any new versions.

    If you need to use qmake in the console then you have to export path to the qmake into PATH system variable like this:
    export QTDIR=<path_to_qt_folder>
    export PATH=$QTDIR/bin:$PATH
    After that you can simply use qmake in any project's folder to build it.

    Optionally: You'd also, probably, need to install XCode's command line tools to use make and other comman-line tools, but it's only for XCode 4.3 and higher.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  8. The following user says thank you to spirit for this useful post:

    timmu (9th August 2012)

  9. #6
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: where is Qt and qmake installed

    Thank you, Spirit!

    I need to use console only, no QtSDK.
    How do I export path to the qmake into PATH system? You sent me the commands but where do I type these (what file should I create or modify and where)?

    So you are saying that installing Qt from Nokia website is not enough for executing this:

    qmake -project
    qmake
    make

    and I need something called XCode? Is that true even if I use the most basic compilation only (as shown above)?

    Thanks!

  10. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    1. Downloaded latest XCode from here. (Of course if you don't have it).
    1.1. Note this step can be skipped if you're using XCode < 4.3..
    Open newly installed XCode, go to preferences (cmd + ,) -> "Downloads" and install "Command Line Tools". After these steps you will be able to use gcc, make etc.
    2. Open terminal and export variables, type:
    export QTDIR=<path_to_qt_folder>
    export PATH=$QTDIR/bin:$PATH
    NOTE: export of these variables must be done for each new terminal tab. There are to options: make a script which will export these variables and then you have to run it each time you open the terminal. Or add exporting of these vars in you profile.

    As to your question:
    and I need something called XCode? Is that true even if I use the most basic compilation only (as shown above)?
    Yes, you need it, because it contains all necessary development stuff.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  11. The following user says thank you to spirit for this useful post:

    timmu (9th August 2012)

  12. #8
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: where is Qt and qmake installed

    Thank you Spirit! Things are getting much more clear to me. I still have more questions if you don't mind.

    1. Instead of exporting the variables every time, I'd like to make changes in my profile to do that. Do you have instructions for that?

    2. How do you check if my computer already has XCode installed (and what version)?

    Thanks!

  13. #9
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    Quote Originally Posted by timmu View Post
    Thank you Spirit! Things are getting much more clear to me. I still have more questions if you don't mind.

    1. Instead of exporting the variables every time, I'd like to make changes in my profile to do that. Do you have instructions for that?
    Add them to ~/.bash_profile

    2. How do you check if my computer already has XCode installed (and what version)?

    Thanks!
    It should be in Applications (/Applications/XCode).
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  14. The following user says thank you to spirit for this useful post:

    timmu (9th August 2012)

  15. #10
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: where is Qt and qmake installed

    Hi Spirit!

    Thanks. Last question (I hope):

    Where is "bash_profile" located?

    Thanks!

  16. #11
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: where is Qt and qmake installed

    In your home (~) folder. If it doesn't exist you should create it.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. deermine if Qt is installed
    By GrahamLabdon in forum Newbie
    Replies: 4
    Last Post: 9th November 2010, 14:57
  2. installed languages
    By bhavyasg in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2009, 21:17
  3. How to set permission of installed files via qmake?
    By totycro in forum Installation and Deployment
    Replies: 1
    Last Post: 25th May 2008, 14:33
  4. can i have both qt3 and qt4 installed
    By illuzioner in forum Installation and Deployment
    Replies: 1
    Last Post: 8th June 2007, 09:50
  5. No printer installed..?
    By Cutey in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2007, 12:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.