Results 1 to 20 of 23

Thread: What constitutes valid Qt folder?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default What constitutes valid Qt folder?

    I have three qt versions

    c:\qt\4.5.2 - qt installed by installer
    c:\qt\4.5.2-gcc - qt compiled from sources in z:\qt-src using mingw gcc 4.4.0
    c:\qt\4.5.2-vc - qt compiled from sources in z:\qt-src using vc++ from vs2008

    When I'm setting them in Qt Creator I get the error
    "[one of the above three paths] is not a valid Qt directory"

    What constitutes valid (from Qt Creator point of view) Qt folder end where can I find documentation on this subject?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What constitutes valid Qt folder?

    "mkspecs" directory containing the "default" directory containing the qmake.conf file and qmake binary in the bin subdirectory of the installation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What constitutes valid Qt folder?

    I think it's not all that is needed.
    From what I see the path of qt is checked against the one compiled into qmake and if they don't match the folder is regarded as not valid by creator.
    Can you confirm this?

    Could you please ask someone in Qt to put this information in documentation?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by piotr.dobrogost View Post
    From what I see the path of qt is checked against the one compiled into qmake and if they don't match the folder is regarded as not valid by creator.
    Can you confirm this?
    I don't even understand what you mean. I don't know what you mean by "path of qt". I know my default Qt installation is under /usr/ and this path is definitely not compiled into qmake (which is in /usr/lib/qt4/bin/qmake softlinked to /usr/bin). From this it is quite clear the directory should contain the bin/qmake path and that in turn needs mkspecs/default/qmake.conf (on Windows) which you can verify by looking at Qt Creator code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by wysota View Post
    I don't know what you mean by "path of qt".
    I meant path to qt installation.

    When I compile qt in one folder and then move it somewhere else and set this new location of qt in creator I always get "is not a valid Qt directory" error. I think this shows that meeting criteria you mentioned is not enough for creator to treat some qt installation as valid. Do you agree?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What constitutes valid Qt folder?

    Well, obviously it doesn't work, since you didn't tell qmake you moved the installation somewhere else. The question is why would you want to move the installation after compilation. If you know you need it elsewhere, use the -prefix switch to configure.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by wysota View Post
    Well, obviously it doesn't work, since you didn't tell qmake you moved the installation somewhere else.
    Do you remember me asking earlier about qmake not respecting environment variables and instead using compiled in path? You answered it uses its compiled in path only as a last resort if it can't tell where the qt is.
    Can you tell me how could I inform qmake about current location of itself and the rest of qt framework so it doesn't use its compiled in and now wrong path?

    Quote Originally Posted by wysota View Post
    The question is why would you want to move the installation after compilation.
    Well, compiling something in the same place you are going to install it is not how it's supposed to be neither in *unix nor Windows not any other OS I think. That's why there's this magic make install step we all are used to.
    Why is this step non-existent in case of qt?
    Why after building I'm left with thousands of tmp files which are going to stay forever without install step?

    Quote Originally Posted by wysota View Post
    If you know you need it elsewhere, use the -prefix switch to configure.
    I was looking for it but guess what, it's not listed as an valid option in configure -help output.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by piotr.dobrogost View Post
    Do you remember me asking earlier about qmake not respecting environment variables and instead using compiled in path? You answered it uses its compiled in path only as a last resort if it can't tell where the qt is.
    The path points to the root of the installation, not to the detailed specs. That is picked up from the installation itself (the "default" subdirectory).

    Can you tell me how could I inform qmake about current location of itself and the rest of qt framework so it doesn't use its compiled in and now wrong path?
    Through -spec (strongest) or QMAKESPEC (weaker).

    Why is this step non-existent in case of qt?
    You are guessing, not stating, right? Well, in that case you are wrong in your guess.

    Why after building I'm left with thousands of tmp files which are going to stay forever without install step?
    Because you didn't run "make clean", I guess.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by wysota View Post
    The path points to the root of the installation, not to the detailed specs. That is picked up from the installation itself (the "default" subdirectory).
    The path doesn't point to the root of the installation but to the lib sub folder.
    Qt Code:
    1. C:\Users\Piotr>qmake -v
    2. QMake version 2.01a
    3. Using Qt version 4.5.2 in C:\Qt\4.5.2-vc\lib
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by wysota View Post
    Through -spec (strongest) or QMAKESPEC (weaker).
    To be able to use either of the above one has to know how to override the default value of the -spec option which creator shows in Projects/Build Settings/Build Steps/Effective qmake call. I had no idea where this value was taken from and couldn't find any information on this topic in documentation. If I missed something and this is documented somewhere please let me know. After reading your answers I took a look at /mkspecs/default and compared this with /mkspecs/win32-msvc2008. The only difference between them was this line
    Qt Code:
    1. QMAKESPEC_ORIGINAL=C:/Qt/4.5.2-vc/mkspecs/win32-msvc2008
    To copy to clipboard, switch view to plain text mode 
    present in the former but absent from the latter. This value is taken by creator as the default value of -spec option. This variable is not even mentioned in qmake's manual at http://doc.qtsoftware.com/4.5/qmake-manual.html
    How could I know what to change if there's no documentation on this?

    Quote Originally Posted by wysota View Post
    You are guessing, not stating, right? Well, in that case you are wrong in your guess.
    I'm not guessing but reading official qt document named Installing Qt on Windows where there's nothing about installation step and nothing about make clean.
    If I'm missing something please let me know.

    Quote Originally Posted by wysota View Post
    Because you didn't run "make clean", I guess.
    I didn't run it because when one is supposed to run
    Qt Code:
    1. make clean
    To copy to clipboard, switch view to plain text mode 
    it should be clearly written in documentation, right?

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by piotr.dobrogost View Post
    The path doesn't point to the root of the installation but to the lib sub folder.
    I meant the "Qt path" in Creator, not qmake. I thought you did as well.

    To be able to use either of the above one has to know how to override the default value of the -spec option which creator shows in Projects/Build Settings/Build Steps/Effective qmake call. I had no idea where this value was taken from and couldn't find any information on this topic in documentation.
    I don't mean to be rude but I tried the first and most simple thing that crossed my mind (specifying the -spec parameter explicitely) and it worked and I'm sure one doesn't need to be a master mind to do the same. I don't think Qt documentation needs to clarify you have to actually have your computer turned on to be able to compile Qt applications. Am I wrong?

    If I missed something and this is documented somewhere please let me know. After reading your answers I took a look at /mkspecs/default and compared this with /mkspecs/win32-msvc2008. The only difference between them was this line
    Qt Code:
    1. QMAKESPEC_ORIGINAL=C:/Qt/4.5.2-vc/mkspecs/win32-msvc2008
    To copy to clipboard, switch view to plain text mode 
    present in the former but absent from the latter.
    Congratulations! Finally!

    This value is taken by creator as the default value of -spec option.
    Yes, that's correct.

    This variable is not even mentioned in qmake's manual at http://doc.qtsoftware.com/4.5/qmake-manual.html
    Why should it be?

    How could I know what to change if there's no documentation on this?
    You shouldn't change it, that's the whole point... Things are sometimes not documented because you shouldn't be mendling with them. You are trying to do something completely the wrong way so don't be surprised you are encountering obstacles and things that are not documented.

    I'm not guessing but reading official qt document named Installing Qt on Windows where there's nothing about installation step and nothing about make clean.
    Because the official way of installing Qt on Windows is an in-place installation. And also because of that at some point (Qt 4.3, as far as I remember) the -prefix parameter was removed from Windows version of configure. Again, you are trying to do something non-standard and encountering problems.

    I didn't run it because when one is supposed to run
    Qt Code:
    1. make clean
    To copy to clipboard, switch view to plain text mode 
    it should be clearly written in documentation, right?
    Does Qt documentation tell you (or should tell you) how to use the mouse or how to login to your computer? Why should Qt documentation include help about using make? Consult the make (or nmake) manual for this! There are rules for make considered standard and "clean" and "distclean" are examples of such. qmake implements them to be compliant with the standards but it doesn't have to document them because they are irrelevant for building Qt, its applications or anything else.

    Using Qt assumes some degree of knowledge about computers, programming, compilers, C++, object-oriented programming and such. Qt is not for morons. Programming is not for morons. Not everybody needs to become a (decent) programmer. If one is not good enough for programming he can live a happy life as a luser bragging that he's good at computers because he knows how to align icons on Windows or think of himself as being a great h4x0r because he knows where to find a script that will break into some buggy cms software. Are we professionals or morons? Please, reader of this post, answer this question yourself (you can even post a reply here stating which is the case for you).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by wysota View Post
    Using Qt assumes some degree of knowledge about computers, programming, compilers, C++, object-oriented programming and such. Qt is not for morons. Programming is not for morons.
    I'm grieved to read the above. I think no one learning and asking questions deserves what you wrote. Nevertheless thank you very much for your time and help.

Similar Threads

  1. Default folder in Qt Creator
    By brunelch in forum Qt Tools
    Replies: 1
    Last Post: 16th July 2009, 17:07
  2. Replies: 1
    Last Post: 7th June 2009, 09:22
  3. Replies: 3
    Last Post: 11th September 2008, 20:08
  4. Path to the previous folder
    By Zergi in forum Newbie
    Replies: 2
    Last Post: 15th July 2008, 18:24
  5. valid a path name
    By klaus1111 in forum Newbie
    Replies: 3
    Last Post: 23rd July 2006, 15:07

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.