I have simple Qt application (Qt version is 4.8.2) run on Debian Linux. When it is run as usual user, everything is ok. When it is run as root, app font is different, so UI looks ugly. I suppose that it cannot find some stylesheets. How can I solve the problem?
2
There are 2 answers
0
On
This is a well known issue which affect several app under debian. Don't try to resolve this issue in your Qt application.
Rather you have two choices. I prefer the first one :
- Set a specific theme for the root application
- Set a specific style inside your application. I remember having a lot of issues with this approach. At the time, depending on the style the application will crash. Use with caution.
I think you need to run
qtconfig
application in root mode in order to choose which style to use when qt apps run in administrative mode.