Results 1 to 6 of 6

Thread: How to use an application qt?

  1. #1
    Join Date
    Nov 2008
    Posts
    17
    Thanks
    2

    Default How to use an application qt?

    If I want to run on a PC a program that uses the qt, I have to install all the qt package, or i can simply import the used library?
    For example
    If I have an executable for linux it will start on all machines linux?

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2
    Thanked 29 Times in 28 Posts

    Default Re: How to use an application qt?

    If Qt was linked statically to your application -> no problem on other machines.
    If Qt was linked dynamically then you need the same Qt version on both machines (e.g. 4.x).

  3. #3
    Join Date
    Nov 2008
    Posts
    142
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 20 Times in 20 Posts

    Default Re: How to use an application qt?

    You should have a look at http://doc.trolltech.com/4.4/deployment.html, it describes pretty well what you have to do to deploy a Qt application under different operating systems.

    As a rule of thumb: no, you don't have to install the whole Qt package, as this includes far more than what you need, like examples, documentation etc., things a mere user would certainly not be interested in. All you need are the libraries your application is linked against. How to determine these libraries depends on the platform you target. Again, the docs mentioned above should tell you what you need.

    A simple, single executable meant for all Linux's surely wouldn't work on all Linux machines, unless it was linked statically. There are just too many possible setups (all hail LSB!), but deploying an application for Linux should be quite easy, as nearly all of them support Qt in one way or another, so supporting a platform should take little more than a recompile for that platform. I've experienced far more problems when deploying to Windows, for example.

  4. #4
    Join Date
    Nov 2008
    Posts
    17
    Thanks
    2

    Default Re: How to use an application qt?

    I have created an application(On Ubuntu) that allows you to select an image, so the displays.
    On the machine where I installed the whole package works QT.
    If I try to bring the application on another computer with ubuntu then the system says that :
    libQtGui.so
    libQtCore.so
    Not Found
    I created a folder to which I added the libraries and I added the path of this folder in LD_LIBRARY_PATH.
    Now if i try to run application it doesn't work correctly. In fact, when i select an image and clic open it shows a windows (that i have done in my program) to tell me that the image can not be loaded.
    How I can solved my problem?

  5. #5
    Join Date
    Nov 2008
    Posts
    142
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 20 Times in 20 Posts

    Default Re: How to use an application qt?

    You probably are missing the right plugin to display the image. Have a look at the /usr/lib/qt4/plugins/imageformats/ directory on your Ubuntu box. You have to deploy these libraries too for your application to support these types.

  6. #6
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 74 Times in 54 Posts

    Default Re: How to use an application qt?

    Please see the page in Assistant on "Deploying an Application on X11 Platforms". It discusses everything you need to do, including plugins.

Similar Threads

  1. Task to another application
    By zlosynus in forum Qt Programming
    Replies: 0
    Last Post: 6th August 2008, 10:04
  2. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  3. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  4. Replies: 3
    Last Post: 8th December 2006, 18:51

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
  •  
Qt is a trademark of The Qt Company.