Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: What constitutes valid Qt folder?

  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.

  12. #12
    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
    I'm grieved to read the above. I think no one learning and asking questions deserves what you wrote.
    I think everyone does - if one manages to learn and at some point achieves a decent level of comprehension, he can say he's not among morons and can feel proud of himself. On the other hand if one doesn't manage to learn, it doesn't yet mean he's a moron. Although if one doesn't see he doesn't learn and despite being told he was doing things the wrong way he continues walking the Dark Path (C), that's different.

    There is nothing wrong in asking questions - that's what this site is for. But if you don't learn from your mistakes and continue doing those same mistakes all over again and again, then something is wrong with you, not with the world around you. Despite what some people would like to think, we are not all equal - some are more talented in some directions than others and less gifted in other directions than others.

    No matter how hard I try, I will never become a painter or a good (or even a bad) basketball player and there is nothing wrong in admitting that to the world. There are also people who no matter how hard they try, they will never be good programmers simply because their minds are not "wired" to that kind of thinking. There is nothing wrong in saying "I can't understand it" - it doesn't mean you never will understand something. If at first you don't succeed, try and try again - but do it the smart way! Don't be a moron, don't waste your time, there is a limited amount of it. I hope you can agree with that without grief.

    Now take a look at this particular case of yours - you wanted to have Qt and Qt Creator in distinct paths in your system. Despite being told to download those two components as two separate packages that are suited for stand-alone installations at desired places, you have been struggling to divide Qt SDK - something that is a merge of the mentioned two packaes with purpose of having both components in the same place. Furthermore instead of building those packages as it is advised in respective pieces of documentation, you've been following the Dark Path that has led you astray and wasted hours of your time. Then instead of admitting your mistakes you have complained that this or that should have been mentioned here or there. You were advised to do something, however you have chosen your own path ("hey, I know better!") and when that led nowhere, you were surprised there had been no directions leading towards the Light.

    But that's also my fault - I might have just kept my mouth shut instead of pointing the right path. I will know better next time, I don't intend to be a moron but instead I'm trying to learn from my mistakes.
    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.


  13. #13
    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?

    Do you know what's the single most important characteristic of a programmer?

  14. #14
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by piotr.dobrogost View Post
    Do you know what's the single most important characteristic of a programmer?
    tell me please... i dont know much..

  15. #15
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by wysota View Post
    I think everyone does - if one manages to learn and at some point achieves a decent level of comprehension, he can say he's not among morons and can feel proud of himself. On the other hand if one doesn't manage to learn, it doesn't yet mean he's a moron. Although if one doesn't see he doesn't learn and despite being told he was doing things the wrong way he continues walking the Dark Path (C), that's different.

    There is nothing wrong in asking questions - that's what this site is for. But if you don't learn from your mistakes and continue doing those same mistakes all over again and again, then something is wrong with you, not with the world around you. Despite what some people would like to think, we are not all equal - some are more talented in some directions than others and less gifted in other directions than others.

    No matter how hard I try, I will never become a painter or a good (or even a bad) basketball player and there is nothing wrong in admitting that to the world. There are also people who no matter how hard they try, they will never be good programmers simply because their minds are not "wired" to that kind of thinking. There is nothing wrong in saying "I can't understand it" - it doesn't mean you never will understand something. If at first you don't succeed, try and try again - but do it the smart way! Don't be a moron, don't waste your time, there is a limited amount of it. I hope you can agree with that without grief.

    Now take a look at this particular case of yours - you wanted to have Qt and Qt Creator in distinct paths in your system. Despite being told to download those two components as two separate packages that are suited for stand-alone installations at desired places, you have been struggling to divide Qt SDK - something that is a merge of the mentioned two packaes with purpose of having both components in the same place. Furthermore instead of building those packages as it is advised in respective pieces of documentation, you've been following the Dark Path that has led you astray and wasted hours of your time. Then instead of admitting your mistakes you have complained that this or that should have been mentioned here or there. You were advised to do something, however you have chosen your own path ("hey, I know better!") and when that led nowhere, you were surprised there had been no directions leading towards the Light.

    But that's also my fault - I might have just kept my mouth shut instead of pointing the right path. I will know better next time, I don't intend to be a moron but instead I'm trying to learn from my mistakes.
    Don't be a moron, don't waste your time, there is a limited amount of it.
    ahem... if you dont mind... can u tell us how much of your time did you wasted in writing this post..??

  16. #16
    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 piotr.dobrogost View Post
    Do you know what's the single most important characteristic of a programmer?
    From what I see you are not curious of answer
    Well, that's kind of funny because the characteristic I was asking about is CURIOSITY.

  17. #17
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What constitutes valid Qt folder?

    Quote Originally Posted by piotr.dobrogost View Post
    From what I see you are not curious of answer
    and how did you deduced this? may be i should have written "i am very curious for.....". Sorry my english is weak...

    Well, that's kind of funny because the characteristic I was asking about is CURIOSITY.
    whats more funny is when ppl think that they are the only smart ass walking around and other are a bunch of fool.

  18. #18
    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
    Well, that's kind of funny because the characteristic I was asking about is CURIOSITY.
    Hmm... on what do you base that opinion (I completely disagree with it)?
    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.


  19. #19
    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 MrDeath View Post
    and how did you deduced this?
    The question was directed to wysota who hasn't answered and I was replaying to wysota not you.

  20. #20
    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
    Hmm... on what do you base that opinion (I completely disagree with it)?
    On opinions of smart people and my own observations.

Similar Threads

  1. Default folder in Qt Creator
    By brunelch in forum Qt Tools
    Replies: 1
    Last Post: 16th July 2009, 18:07
  2. Replies: 1
    Last Post: 7th June 2009, 10:22
  3. Replies: 3
    Last Post: 11th September 2008, 21:08
  4. Path to the previous folder
    By Zergi in forum Newbie
    Replies: 2
    Last Post: 15th July 2008, 19:24
  5. valid a path name
    By klaus1111 in forum Newbie
    Replies: 3
    Last Post: 23rd July 2006, 16: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.