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)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I would verify that the installation procedure for Qt did not set root permissions by accident on ~/.config/Trolltech.conf. If they did - then when you run QtConfig it will not be able to have any impact - as it cannot write that file. It may not be even able to read it.

Code: Select all
ls -la ~/.config/Trolltech.conf


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
hooverphonic
Registered Member
Posts
19
Karma
0
OS
I am well aware of that. (Note: I'm no beginner. I know of that "problem" when using a Linux-ish distro running off a live CD and having forgotten to chown the customized *rc files I "import" from my USB stick (uh oh, what a creative idea to have root-owned *rc files in your ~/.kde/share/config folder lol) :o)

But back to the qtconfig issue: also with correct permissions set (or even given a full octal 777 value) changes will only show up if the app affiliated is run under root or under normal user with sudo.
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:I would verify that the installation procedure for Qt did not set root permissions by accident on ~/.config/Trolltech.conf. If they did - then when you run QtConfig it will not be able to have any impact - as it cannot write that file. It may not be even able to read it.

Code: Select all
ls -la ~/.config/Trolltech.conf


Could you read previous posts? Please don't stick to the same question without looking at any answers. Thanks!


guanx wrote:
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
Being able to write to the file may have no impact if the owner of the file is incorrect, which is why I asked for the "ls -la" output.

In any case... Setting changes made by the root user should never have an impact upon your normal user unless:

1) It is a KDE configuration file, and the value is set to be immutable - in a system wide file. Unless you did this, this will not be the case.
2) Your environment variables are incorrect - leading to the root configuration file being followed.

It could also be the case that KDE, through it's platform plugin is overriding the selections - but in that case the root setting changes should have no impact.

To check if the platform plugin is performing overrides, open System Settings > Application Appearance > Fonts, and make changes there. It would also explain why Skype behaves correctly - as it uses it's own copy of Qt - and does not use the KDE platform plugin as a result I believe.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:Being able to write to the file may have no impact if the owner of the file is incorrect, which is why I asked for the "ls -la" output.

Thanks for the hint. But I remember I also mentioned somewhere that "I deleted that file ..." so qtconfig created a new one. Normally it is impossible for an unprivileged user to create a new file not belonging to itself.

bcooksley wrote:In any case... Setting changes made by the root user should never have an impact upon your normal user unless:

1) It is a KDE configuration file, and the value is set to be immutable - in a system wide file. Unless you did this, this will not be the case.

I would have been happy if (non-KDE) Qt programs had followed the KDE configuration. In that case I would not have needed to bother with qtconfig.

bcooksley wrote:2) Your environment variables are incorrect - leading to the root configuration file being followed.

Not the case. "strace" shows that qtconfig have really read in the correct config file, completely without error.

bcooksley wrote:It could also be the case that KDE, through it's platform plugin is overriding the selections - but in that case the root setting changes should have no impact.

To check if the platform plugin is performing overrides, open System Settings > Application Appearance > Fonts, and make changes there. It would also explain why Skype behaves correctly - as it uses it's own copy of Qt - and does not use the KDE platform plugin as a result I believe.

On the contrary -- Skype behaves incorrectly, and exactly in the same way that other Qt programs, including but not limited to qtconfig, do. That is: They are aware of the changes (say, UI font) when the "Save" menu of qtconfig is clicked, but after a restart they go back to some kind of defaults.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm not aware of why this issue would occur then.
Can you verify that your system only has one copy of Qt installed?

Have you tried removing the Trolltech.conf file, then making the Font configuration changes through KDE System Settings, and not using Qt Config?

Finally, can you verify that this problem affects all newly started Qt and KDE applications - but they all apply the correct settings if you change them in Qt Config.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
guanx
Registered Member
Posts
9
Karma
0
bcooksley wrote:I'm not aware of why this issue would occur then.
Can you verify that your system only has one copy of Qt installed?

Have you tried removing the Trolltech.conf file, then making the Font configuration changes through KDE System Settings, and not using Qt Config?

Finally, can you verify that this problem affects all newly started Qt and KDE applications - but they all apply the correct settings if you change them in Qt Config.


Yes. I installed a fresh Slackware Linux system which has only one Qt lib and KDE 4.8.2. The problem is still there.

Making the Font configuration changes through KDE System Settings? I have to look. Until now I don't find how to change font substitution in KDE System Settings.

I can verify that this happend to the Qt apps that I frequently use. There are too many of the around the world so I cannot verify them all 8)


Bookmarks



Who is online

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