Solved! If I explicitly set it to a QString, it works perferctly.

Qt Code:
  1. a=QtCore.QString(getdb())
  2. txtdb.setText(a)
To copy to clipboard, switch view to plain text mode 

wysota, you're a hero. Many thanks!