This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

[qtconfig] QT4 and qtconfig does not change the font

Tags: None
(comma "," separated)
Xtigyro
Registered Member
Posts
3
Karma
0
OS
Hi folks!

I'm using openSUSE 11.2 and there is QT ver. 4.5.3.
I use Skype a lot because all of my friend do so. However, the default font in skype cannot be changed inside Skype. I tried with 'qtconfig' tool but it DOES NOT change anything, though I select a different font size and then "File > Save".

I see these errors in the console:

QPainter::begin: Cannot paint on a null pixmap
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::end: Painter not active, aborted

It does not matter what I change in 'qtconfig', the effect is "zero".
I think that I've read somewhere that the SUSE team use different policy in 11.2 by which fonts can be changed and I believe the problem is that the fonts can be changed only in KDE System Settings > Appearance > Fonts. But I do not want to ruin all of my fonts because of such a poor application like Skype in Linux.

Thank you for your help in advance!!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
KDE overrides the details set by "qtconfig" in most cases, such as style and fonts, so that its own utilities settings can take effect. Those errors are harmless, however if output by Skype, could be indicative that it is forcing its own font size, etc.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Xtigyro
Registered Member
Posts
3
Karma
0
OS
No, it's not skype forcing sth.
No QT-based application use the new settings in 'qtconfig'. Even after every new start of 'qtconfig' the settings (in it) that I previously changed, are the defaults again.
Xtigyro
Registered Member
Posts
3
Karma
0
OS
I upgraded to ver. 4.6 (a pre-release version) of QT.
Again 'qtconfig' does not apply any changes to the font and font size.

The errors are all the same but now 'qtconfig' can change the GUI style of the QT-based applications.

The interesting thing is that the GUI style setting is not set to the default after every restart of 'qtconfig'.
guanx
Registered Member
Posts
9
Karma
0
I can confirm this on KDE 4.5.5 with Qt 4.7.0. Struggled months without finding out a solution.

KDE apps are ok because they take KDE settings. But Qt-only apps are extremely ugly without proper default font.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Qt stores it's own preferences at ~/.config/Trolltech.conf - so you might want to check the permissions on that file.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:Qt stores it's own preferences at ~/.config/Trolltech.conf - so you might want to check the permissions on that file.

That file is properly modified by qtconfig. But neither qtconfig nor other Qt4 programs are using the new font settings in that file.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Are you using the Oxygen style? It may be following KDE preferences first, Qt preferences second.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:Are you using the Oxygen style? It may be following KDE preferences first, Qt preferences second.


Do you mean Application Style in System Settings? I am using Plastique.

My KDE font is set to -- Monospace font: Liberation Mono; Others: WenQuanYi Bitmap Song. WenQuanYi Bitmap Song is a very sharp bitmap font for both ASCII and Chinese.

However, Qt apps seem to be using WenQuanYi Zen Hei, which is a vector font very ugly at small sizes.

ASCII characters in (non-KDE) Qt apps are very broken. Definitely not what specified in Trolltech.conf (Liberation Sans) nor what specified in KDE System Settings (WenQuanYi Bitmap Song).

Chinese characters also ugly for the same reason.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please erase the ~/.config/Trolltech.conf file, as it may be corrupt..


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:Please erase the ~/.config/Trolltech.conf file, as it may be corrupt..

I have already tried that -- even by creating a new user account.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This is probably Skype in this case, ignoring and overriding the Qt/KDE settings.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
hooverphonic
Registered Member
Posts
19
Karma
0
OS
No, you all seem wrong.
It actually must have to do something with the ROOT user.

Just FWIW, my guinea-pig was SoulseekQT (file-sharing app).

- Ordinary user account, bash
- Said "qtconfig"
- Made changes
- Saved changes
- Ran SoulseekQT

Result: App still came up with standard font and standard appearance.

Now I ran - from this user account - a "sudo SoulseekQT".
Changes appeared!

Modifications were always neatly written to my user account (~/.config/Trolltech.conf) but for some very odd reason were only loaded into qtconfig whenever qtconfig was started as

Code: Select all
$ sudo qtconfig


"qtconfig" without the "sudo" would always show up standard settings and ignore everything that's in Trolltech.conf in my home directory.

That MUST be a bug.
I can't seem to accept running my app directly as root or suid root just because I want my QT settings to get applied.

Again in short summary:
You can make your modifications as a regular user, but qtconfig will only load the modified parameters if you do a "sudo qtconfig".
guanx
Registered Member
Posts
9
Karma
0
To: hooverphonic, I can confirm that qtconfig works for root.

But for normal users, neither qtconfig nor other Qt applications follow the configurations in ~/.config/Trolltech.conf.

I repeat -- neither qtconfig nor other Qt applications work as normal user. Please don't say it's Skype's problem. No problem for root, neither qtconfig nor other Qt applications.

This is not a Skype-specific problem.
Thanks!
hooverphonic
Registered Member
Posts
19
Karma
0
OS
Nah, not a single thing to do with Skype, whatsoever!
I fully confirm. That IS a KDE or Qt issue.

And no, it can't be correct behavior that you *must* be root to get your changes applied that you made as a regular user. That's absurd.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]