PDA

View Full Version : QT 4.7 looks ugly on GNOME!



Karit
3rd November 2010, 07:22
Hi all!
I have installed QT 4.7.0 from source code in my "LinuxMint Debian based" OS. It was a little hard but I did it. =)

My post is because the gui of "dessigner", "assistant" and "qtdemo" looks ugly... although qtcreator looks perfect! Maybe because I installed it separately from the others(I download the package qt-creator-linux-x86-opensource-2.0.1.bin from thw nokia site).

Here are some Images:

http://img835.imageshack.us/img835/8341/qtassistant.png

http://img828.imageshack.us/img828/8540/qtdesigner.png

http://img219.imageshack.us/img219/1164/qtexamplesanddemos.png

And the QT Creator look pretty beautiful!!

http://img573.imageshack.us/img573/7025/qtcreator.png

Can anyone help me and tell me what packages shold I intstall?
Or what configuration files should I change??

Thanks!

wysota
3rd November 2010, 07:48
Run the qtconfig tool and see what the default style of Qt applications is used. You might have disabled some styles when building Qt.

ChrisW67
3rd November 2010, 08:17
It's possible that Qt was built without support for TrueType or anti-aliased fonts, while the pre-built Creator binary was. I would guess the correct configure option would be "-fontconfig" and that is on by default in my copy. It may not be finding the needed includes and libraries during configure.


$ ./configure --help
---8<---snip----
-no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
* -fontconfig ........ Compile FontConfig support.
Requires fontconfig/fontconfig.h, libfontconfig,
freetype.h and libfreetype.

Karit
4th November 2010, 04:44
It's possible that Qt was built without support for TrueType or anti-aliased fonts, while the pre-built Creator binary was. I would guess the correct configure option would be "-fontconfig" and that is on by default in my copy. It may not be finding the needed includes and libraries during configure.


$ ./configure --help
---8<---snip----
-no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
* -fontconfig ........ Compile FontConfig support.
Requires fontconfig/fontconfig.h, libfontconfig,
freetype.h and libfreetype.


So what?
I have to uninstall QT and install it again but with the correct -fontconfig parameter?

ChrisW67
4th November 2010, 06:49
No need to uninstall, but you may need to reconfigure, rebuild, and reinstall. Ultimately, only you know whether you changed the configure options when you built the source code, if the configure turned something off because require libraries could not be found, or what's on your machine.

If

pkg-config --exists fontconfig --exists freetype2 && echo Yes

prints Yes then you should be able to build with fontconfig and freetype support. Also inspect the options in
./configure --help

Karit
6th November 2010, 22:59
I decided to follow the ChrisW67's instructions and everything was OK! ;)

I will write all the steps I did:



cd /opt/qt-everywhere-opensource-src-4.7.0/
make confclean
./configure -opensource -largefile -no-qt3support -gtkstyle -fontconfig
make
make install


When all the commands above were done, I run qtdemo and QT Designer and it was the result:

http://img837.imageshack.us/img837/1164/qtexamplesanddemos.png

http://img440.imageshack.us/img440/8540/qtdesigner.png

Thanks to all
Post Solved!

alphazero
24th November 2010, 14:42
I have same problem..

I have installed Linux Mint 10 Julia GNOME version 64 bit with Qt 64 bit inside
But I find menu bar of QtDesigner is different with my default theme (Macbuntu theme)
And when I highlight "File > Open", it turns white font without blue background highlight like in Mozilla

For image, please find below attachment.

Please help me how to solve this problem.

Note :
I have set GTK+ as default setting in Qt4 Config