Results 1 to 4 of 4

Thread: Qt Application looks ugly with static linking but fine with shared linking?

  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    19
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Qt Application looks ugly with static linking but fine with shared linking?

    Hi Experts,

    I am developing a Qt dialog based application,
    When i compile it with shared linking then everything works fine as i need to devlope same application with static linking but with static linking it looks too ugly and also ui is classic ui.

    I am using Qt creator 2.2.1 based on Qt 4.7.4 (32 bit)
    source version of Qt is Qt-4.8.0.
    uname -a returning
    Linux ubuntu 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 17:23:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    How i can solve this problem?

    Thanks in advance.

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

    Default Re: Qt Application looks ugly with static linking but fine with shared linking?

    Basically you probably can't. By using static linking you resign from using plugins which are used by Qt (and KDE) to handle widget styling. What you can do is that you can compile a static version of an appropriate widget style plugin and force that style on your application. However in this situation your application will not inherit the style from the rest of your system if it uses a style that itself is implemented as a plugin.
    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
    Jan 2012
    Location
    India
    Posts
    19
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Qt Application looks ugly with static linking but fine with shared linking?

    Thanks Wysota for your response.

    I have another machine having
    Qt creator 2.2.1 based on Qt 4.7.4 (32 bit)
    source version of Qt is Qt-4.8.0.
    uname -a returning
    Linux ravi-desktop 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 15:59:53 UTC 2012 i686 i686 i386 GNU/Linux

    The static as well as shared linking works fine on above mentioned system. There is no difference of UI at all between statically linking and shared linking. Only one issue is that application is littlebit slow.

    what may be the problem on my system?

    Can i compile static application on another machine both for 32 bit and 64 bit Ubuntu system and how?

    Thanks in advance.

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

    Default Re: Qt Application looks ugly with static linking but fine with shared linking?

    The other system probably has different settings or uses different software.

    Can i compile static application on another machine both for 32 bit and 64 bit Ubuntu system and how?
    If you have 32 and 64b compilers and libraries, then yes, just use appropriate qmake. However usually 64bit systems support 32bit binaries, so building a trully static 32bit version should be enough.
    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. The following user says thank you to wysota for this useful post:

    gurmeetsingh (10th February 2012)

Similar Threads

  1. Replies: 10
    Last Post: 20th December 2015, 12:14
  2. Qt application is not compiling with static linking?
    By gurmeetsingh in forum Qt Programming
    Replies: 14
    Last Post: 24th April 2012, 07:21
  3. Shared Object In Qt and Linking to main application
    By Ashutosh2k1 in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2011, 11:36
  4. Static Linking Application for Realease
    By impeteperry in forum Qt Programming
    Replies: 2
    Last Post: 14th November 2007, 19:12
  5. Replies: 2
    Last Post: 1st August 2007, 16:04

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.