Results 1 to 5 of 5

Thread: deermine if Qt is installed

  1. #1
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default deermine if Qt is installed

    Hi all
    What is the best practice to programatically determine in Qt is installed on a given machine?
    I use the following
    Qt Code:
    1. QDir dir (QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator());
    To copy to clipboard, switch view to plain text mode 
    and then check if the directory exits.
    Being new yo Qt I would appreciate feedback as to whether this is the best way

    TIA

    Graham

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: deermine if Qt is installed

    Use A to check if A exists? I have a feeling that doesn't always work.

    Create a script or whatever to check if qmake exists.

  3. #3
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: deermine if Qt is installed

    If Qt isn't installed, QDir isn't going to work unless you happened to build everything using static libraries. This sort of task would be more appropriately handled using a wrapper script of some sort.

  4. #4
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: deermine if Qt is installed

    Hi
    Thanks for the reply
    I am completely new to this!
    I need to create a Qt app that deploys on Widows,Linux and Mac
    For Windows I use Inno to create an installation file
    For Linux I amusing Debreate to create a .deb file

    Should I be using dynamically linked Qt libraies?
    What is a wrapper script?

    TIA
    Graham

  5. #5
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: deermine if Qt is installed

    Dynamic libraries are the preferred implementation in nearly all cases.

    A wrapper script is a script that sets up the environment needed by an application, then invokes the application when all is as it should be. This would include checks for installed dynamic libraries needed by the application, setting environment variables and other tasks. Doing all this in a script ensures that the user will still receive a reasonable message if something is missing, and keeps the application from polluting the user's environment with it's own specialized settings.

Similar Threads

  1. how to make qt use the g++ I installed
    By lwb422 in forum Installation and Deployment
    Replies: 0
    Last Post: 11th April 2010, 16:25
  2. The Qt version is not installed
    By bmahf in forum Installation and Deployment
    Replies: 2
    Last Post: 20th October 2009, 00:09
  3. can i have both qt3 and qt4 installed
    By illuzioner in forum Installation and Deployment
    Replies: 1
    Last Post: 8th June 2007, 09:50
  4. correctly installed Qt4
    By Salazaar in forum Installation and Deployment
    Replies: 31
    Last Post: 7th May 2007, 08:24
  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.