Adam's

adam@debian:~$ cat /dev/random

设置Qt主题

with 9 comments

非KDE环境下的Qt4程序默认主题, 实在是丑.

我有两个比较常用的Qt程序: SMPlayer和VirtualBox, 自从它俩升级至Qt4后我就一直在忍受那个丑陋的默认主题, 而今天, 终于忍不住动手调整了下.

方法嘛, Debian用户安装qt4-qtconfig, 运行qtconfig就是了, 一目了然. 当然, 对于我来说, 装这么个东西外加那么多依赖是不可以接受的, 目的只是为了搞清楚配置文件的位置和写法, 呵呵.

废话少说, 配置文件位于~/.config/Trolltech.conf

[Qt]
style=Cleanlooks
font="Sans Serif,9,-1,5,50,0,0,0,0,0"

最主要的主题和字体配置语句如上, Cleanlooks是默认带的, 个人觉得挺好. 另外, 指定主题为”GTK+”则会使用QGtkStyle特性让Qt使用当前的Gtk主题, 可惜我这里会报错”QGtkStyle was unable to detect the current GTK+ theme.”

好了, 可以把qt4-qtconfig卸载了.

Written by adam8157

August 15th, 2010 at 11:51 pm

Posted in Linux,Tips

Tagged with ,

9 Responses to '设置Qt主题'

  1. 学习了。

    [Reply]

    gaozyuan

    16 Aug 10 at 02:53

  2. 主题比banban好看多了

    [Reply]

    gaozyuan Reply:

    @gaozyuan,
    比banban的主题

    [Reply]

    adam8157 Reply:

    @gaozyuan, 哈哈

    [Reply]

    gaozyuan

    16 Aug 10 at 02:54

  3. 很困的飘过

    [Reply]

    DOn.e

    20 Aug 10 at 23:44

  4. 求指教:为什么我qt程序和gnome程序鼠标指针不同呢?gnome的是一种,移动到qt上是另一种。我gnome环境,2.30,10.04

    [Reply]

    delectate

    3 Sep 10 at 19:24

  5. 补充,arch也是如此,郁闷死啦!

    [Reply]

    adam8157 Reply:

    @delectate, 你.gtkrc-2.0和.Xresources中定义的光标主题一样?

    [Reply]

    delectate Reply:

    @adam8157, 恩。以前2.28还没事,2.30事情不断。最初arch调节亮度都没有显示呢,后来更新了下,好了 :)

    [Reply]

    delectate

    3 Sep 10 at 19:25

Leave a Reply