Results 1 to 7 of 7

Thread: qmake persistent property (environment variables) on Linux systems

  1. #1
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default qmake persistent property (environment variables) on Linux systems

    Hello.

    I'm trying to set the qmake persistent properties which is also called environment variables in order to use the older version of qt in qt creator.

    Here is the relevant packages I have:
    - Qt Creator 2.4.1 (Based on Qt 4.8.0 (32 bit))
    - Qt 3.4.8b
    - Qt 4.8.1

    By default, Qt Creator uses Qt 4.8.1, but I need to change this to the older version of Qt (3.4.8b).
    So I go to "Tools -> Options -> Build & Run -> Qt Versions" tab, and added qmake that is linked to the qmake-qt3.
    (My system, Ubuntu 12.04, uses update-alternatives to maintain different versions of packages. So qmake is linked to the qmake-qt3.)

    Anyway, that causes an error such as "Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?".
    I googled the error message and found that this is because my qmake does not have its environment variables.
    When I typed the command, '$ qmake -query', the result shows nothing while '$ qmake-qt4 -query' shows the below:

    QT_INSTALL_PREFIX:/usr
    QT_INSTALL_DATA:/usr/share/qt4
    QT_INSTALL_DOCS:/usr/share/qt4/doc
    QT_INSTALL_HEADERS:/usr/include/qt4
    QT_INSTALL_LIBS:/usr/lib/i386-linux-gnu
    QT_INSTALL_BINS:/usr/bin
    QT_INSTALL_PLUGINS:/usr/lib/i386-linux-gnu/qt4/plugins
    QT_INSTALL_IMPORTS:/usr/lib/qt4/imports
    QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
    QT_INSTALL_CONFIGURATION:/etc/xdg
    QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
    QT_INSTALL_DEMOS:/usr/lib/qt4/demos
    QMAKE_MKSPECS:/usr/share/qt4/mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.8.1

    Based on this, I tried to set the variables using 'qmake -set' command.
    But... I made some typo... and resulted in adding wrong vaiables. My qmake (= qmake-qt3) persistent properties have the variables the below:

    QT_INSTALL:
    QT_INSTALL_PREFIX:
    QT_NINSTALL_PREFIX:


    I set the values as NULL using the command such as ' $ qmake -set QT_INSTALL "" '.
    But I don't know how to remove those.

    I tried to remove the package, qt3-dev-tools, from my system and install it agian, but it did not helped me.
    I saw some postings about the qmake persistent properties, but I couldn't find any helpful articles till now.

    So could anyone help me to remove these variables and start it over?

    * Oh. I forgot telling that I installed my Qt3 and Qt4 via Ubuntu apt-get command.
    Last edited by hwanud; 18th August 2013 at 04:53.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qmake persistent property (environment variables) on Linux systems

    Quote Originally Posted by hwanud View Post
    So could anyone help me to remove these variables and start it over?
    Qt Code:
    1. $ qmake -unset VARIABLE
    To copy to clipboard, switch view to plain text mode 
    "qmake -h" is also useful

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

    hwanud (21st August 2013)

  4. #3
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake persistent property (environment variables) on Linux systems

    Thank you for yor reply.
    I have tried that command, qmake -unset, but it did not work for me unfortunately.
    Also I tried qmake -remove and -clear, but same result.
    qmake -h does not give me any helpful options, too.

    Did I miss something?

  5. #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: qmake persistent property (environment variables) on Linux systems

    Qt 3.4.8? Wasn't the last Qt3 version 3.3.8?

    By the way, qmake -set does not operate on environment variables, these are internal qmake variables. I don't think Qt3 used those, by the way. We only had $QTDIR (which indeed was an environment variable) there, as far as I remember.

    Since the qmake syntax and the whole development approach in Qt3 was much different than Qt4, I doubt you will be able to force QtCreator to help you with such projects in any meaningful way. You can still use it as a rich code editor but you should manage the project yourself (you can still ask Creator to build the project for you though).
    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.


  6. The following user says thank you to wysota for this useful post:

    hwanud (21st August 2013)

  7. #5
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake persistent property (environment variables) on Linux systems

    @wysota

    Sorry, I made a mistake about the version. You're right. My Qt version is 3.3.8b.
    Thank you.

    For the use of Qt3 on Creator, your opinion looks right. Even though I force to set the all variables of qmake-qt3 to the values I have extracted from the result of 'qmake-qt4 -query', Creator does not work as I expected. Maybe it does not support lower version of Qt than Qt4.
    As you told, it might be better to use the Creator as a rich code editor if I want to develop something using Qt3.

    Thanks for your helpful advice!

  8. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qmake persistent property (environment variables) on Linux systems

    Actually you are much better off not developing anything in Qt3 at all.

  9. The following user says thank you to ChrisW67 for this useful post:

    hwanud (21st August 2013)

  10. #7
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake persistent property (environment variables) on Linux systems

    Thanks a lot.

    Actually I am not developing my app from the beginning. I just want to use the simulator which is already developed based on Qt3.
    With the Makefile provided for the simulator, I can compile and run the code without any problem, but the vi environment is not that comfortable for me yet.
    This is why I want to use Creator.

    I will use Qt4 when I make something for myself as you advised me.
    Last edited by wysota; 21st August 2013 at 07:41.

Similar Threads

  1. Environment variables and qmake
    By Zingam in forum Qt Tools
    Replies: 4
    Last Post: 27th July 2012, 03:22
  2. Replies: 1
    Last Post: 25th February 2011, 15:08
  3. Replies: 0
    Last Post: 24th November 2010, 11:11
  4. Environment variables in project .includes?
    By Karmaflute in forum Qt Tools
    Replies: 4
    Last Post: 26th November 2009, 00:59
  5. Accessing Environment Variables
    By mhoover in forum Qt Programming
    Replies: 6
    Last Post: 21st September 2006, 15:05

Tags for this Thread

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.