How can I theme my Qt app to resemble one written in Gtk?

Note: this is useful to desktop users, not to developers using Qt.

sudo apt-get install qt4-qtconfig, then go to System / Preferences / Qt 4 settings and select GTK style in the first combobox:

Qt Configuration dialog


Qt apps don't follow the font hinting settings that are set by gnome-appearance-properties. You need to explicitly add an entry to $HOME/.fonts.conf e.g.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
</fontconfig>