For how to print QStrings in gdb, see http://silmor.de/46.