Results 1 to 6 of 6

Thread: Qt Library on Ubuntu, strange style problem

  1. #1
    Join Date
    May 2011
    Posts
    46
    Thanks
    5

    Default Qt Library on Ubuntu, strange style problem

    I compiled Qt 4.7.4 and Qt 4.8 on Ubuntu 11.04, the results are the same.
    When I launch qtconfig/designer/assistant, the theme and font don't match the theme of Ubuntu, app linked with the frameworks also have strange style
    Screenshot-Qt Assistant.jpg
    While using the QtCreator, QtCreator itself has style that matches the Ubuntu 11.04 style, but apps created from it don't, I tried using qtconfig to change among styles but nothing helps.
    Also, if I launch qtconfig with sudo, the visual style becomes the Windows style...
    Are there anyway to use the Ubuntu style in Qt-based app?

  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: Qt Library on Ubuntu, strange style problem

    Did you build Qt with fontconfig support?
    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 2011
    Posts
    46
    Thanks
    5

    Default Re: Qt Library on Ubuntu, strange style problem

    here is how I run configure:

    Qt Code:
    1. sh ./configure -opensource -debug-and-release -nomake examples -nomake demos -shared -fast -exceptions -no-accessibility -stl -no-qt3support -no-phonon -no-webkit -no-script -no-declarative -no-scripttools -no-declarative-debug -no-3dnow -no-openssl -qt-zlib -qt-libpng -qt-libtiff -qt-libjpeg -qt-sql-sqlite -qt-sql-mysql -I /usr/include/mysql -L /usr/lib/mysql
    To copy to clipboard, switch view to plain text mode 

  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: Qt Library on Ubuntu, strange style problem

    It's less relevant how you call configure, it is more relevant what it reports. At some point it should spit out the configuration it is going to use in a form of a list with yes/no info about each entry. Make sure fontconfig is there and the style your default Qt uses is there.
    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 2011
    Posts
    46
    Thanks
    5

    Default Re: Qt Library on Ubuntu, strange style problem

    I just rerun configure, and the result is:
    Debug .................. no
    Qt 3 compatibility ..... no
    QtDBus module .......... no
    QtConcurrent code ...... yes
    QtGui module ........... yes
    QtScript module ........ no
    QtScriptTools module ... no
    QtXmlPatterns module ... yes
    Phonon module .......... no
    Multimedia module ...... auto
    SVG module ............. yes
    WebKit module .......... no
    Declarative module ..... no
    Support for S60 ........ no
    Symbian DEF files ...... no
    STL support ............ yes
    PCH support ............ yes
    MMX/3DNOW/SSE/SSE2/SSE3. yes/no/yes/yes/yes
    SSSE3/SSE4.1/SSE4.2..... yes/yes/yes
    AVX..................... yes
    Graphics System ........ default
    IPv6 support ........... yes
    IPv6 ifname support .... yes
    getaddrinfo support .... yes
    getifaddrs support ..... yes
    Accessibility .......... no
    NIS support ............ yes
    CUPS support ........... no
    Iconv support .......... yes
    Glib support ........... no
    GStreamer support ...... no
    PulseAudio support ..... no
    Large File support ..... yes
    GIF support ............ plugin
    TIFF support ........... plugin (qt)
    JPEG support ........... plugin (qt)
    PNG support ............ yes (qt)
    MNG support ............ plugin (qt)
    zlib support ........... yes
    Session management ..... yes
    OpenGL support ......... no
    OpenVG support ......... no
    NAS sound support ...... no
    XShape support ......... yes
    XVideo support ......... no
    XSync support .......... yes
    Xinerama support ....... no
    Xcursor support ........ no
    Xfixes support ......... no
    Xrandr support ......... no
    Xrender support ........ yes
    Xi support ............. no
    MIT-SHM support ........ yes
    FontConfig support ..... no
    XKB Support ............ yes
    immodule support ....... yes
    GTK theme support ...... no
    MySQL support .......... qt
    SQLite support ......... qt (qt)
    OpenSSL support ........ no
    Alsa support ........... no
    ICD support ............ no
    libICU support ......... no

    So, I don't have FontConfig support, and I also don't have GTK theme support.
    How can I get it work? Thanks

    In addition, I specified "-debug-and-release", but why would configure just ignore the debug build?
    Configure output this as the configuration:

    Configuration .......... release shared dll largefile stl precompile_header mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx minimal-config small-config medium-config large-config full-config reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify png freetype zlib nis iconv x11sm xshape xsync xrender mitshm xkb xmlpatterns multimedia audio-backend svg release

    Debug .................. no

  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: Qt Library on Ubuntu, strange style problem

    Start with: sudo apt-get install libfontconfig1-dev libglib2.0-dev libgtk-3-dev
    Then rerun configure. It's likely you'll need to install more packages if you want additional features enabled (such as OpenGL, CUPS, OpenSSL, etc.).
    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. The following 2 users say thank you to wysota for this useful post:

    grayfox (27th September 2011), stef13013 (20th October 2012)

Similar Threads

  1. Replies: 2
    Last Post: 4th September 2011, 01:11
  2. Example using Policy kit library with Qt on Ubuntu
    By phutomo in forum Qt Programming
    Replies: 2
    Last Post: 20th April 2011, 13:01
  3. Replies: 5
    Last Post: 25th July 2010, 11:58
  4. Replies: 0
    Last Post: 4th November 2009, 08:45

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.